mirror of
https://github.com/Moe1369/nixos-config.git
synced 2024-10-18 04:14:08 +02:00
Merge branch 'main' of https://github.com/Moe1369/nixos-config
This commit is contained in:
commit
75b518eeef
223
flake.lock
223
flake.lock
@ -1,5 +1,103 @@
|
||||
{
|
||||
"nodes": {
|
||||
"crane": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717535930,
|
||||
"narHash": "sha256-1hZ/txnbd/RmiBPNUs7i8UQw2N89uAK3UzrGAWdnFfU=",
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"rev": "55e7754ec31dac78980c8be45f8a28e80e370946",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ipetkov",
|
||||
"repo": "crane",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717285511,
|
||||
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"pre-commit-hooks-nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -27,11 +125,11 @@
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724304322,
|
||||
"narHash": "sha256-/nrlMDubg9oG2VNANRBxsas5RbcJtB6IIDPZC3yHLW8=",
|
||||
"lastModified": 1724837759,
|
||||
"narHash": "sha256-gt1mCTlqnirTHAG8Q90IWEs91fRsTSjBqXhb6bQboe8=",
|
||||
"owner": "Jovian-Experiments",
|
||||
"repo": "Jovian-NixOS",
|
||||
"rev": "924a18ea8df89a39166dd202f3e73cd022825768",
|
||||
"rev": "a679e3a0ef9d3d43639f7ba894069c43e2d39c2c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -41,6 +139,33 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"lanzaboote": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718178907,
|
||||
"narHash": "sha256-eSZyrQ9uoPB9iPQ8Y5H7gAmAgAvCw3InStmU3oEjqsE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "lanzaboote",
|
||||
"rev": "b627ccd97d0159214cee5c7db1412b75e4be6086",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "v0.4.1",
|
||||
"repo": "lanzaboote",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-flatpak": {
|
||||
"locked": {
|
||||
"lastModified": 1711997201,
|
||||
@ -95,13 +220,29 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1724224976,
|
||||
"narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
|
||||
"lastModified": 1710695816,
|
||||
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
|
||||
"rev": "614b4613980a522ba49f0d194531beddbb7220d3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1724819573,
|
||||
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "71e91c409d1e654808b2621f28a327acfdad8dc2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -134,14 +275,82 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks-nix": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"lanzaboote",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717664902,
|
||||
"narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"jovian": "jovian",
|
||||
"lanzaboote": "lanzaboote",
|
||||
"nix-flatpak": "nix-flatpak",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"plasma-manager": "plasma-manager"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"lanzaboote",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"lanzaboote",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1717813066,
|
||||
"narHash": "sha256-wqbRwq3i7g5EHIui0bIi84mdqZ/It1AXBSLJ5tafD28=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
181
flake.nix
181
flake.nix
@ -1,5 +1,6 @@
|
||||
{
|
||||
description = "Moe.OS";
|
||||
|
||||
# Define Inputs
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
@ -14,90 +15,98 @@
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
# Define Outputs, import Modules
|
||||
outputs =
|
||||
{
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
jovian,
|
||||
plasma-manager,
|
||||
nix-flatpak,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# Define system globally since I have no aarch devices
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
lib = nixpkgs.lib;
|
||||
# NixOS Modules for all hosts
|
||||
systemModules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
./modules/system/apps-shell
|
||||
./modules/system/boot
|
||||
./modules/system/devices
|
||||
./modules/system/home-manager
|
||||
./modules/system/locale
|
||||
./modules/system/networking
|
||||
./modules/system/nixsettings
|
||||
./modules/system/shell
|
||||
./modules/system/systemversion
|
||||
./modules/system/upgrades
|
||||
./modules/system/users
|
||||
];
|
||||
# Home Manager Modules for all hosts
|
||||
userModules = [
|
||||
./modules/user/git
|
||||
./modules/user/homeversion
|
||||
./modules/user/shell
|
||||
];
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
# Workstation config
|
||||
# user and hostName variable inside hostConfig so we can call it in other modules
|
||||
workstation =
|
||||
let
|
||||
user = "mo";
|
||||
hostName = "workstation";
|
||||
in
|
||||
lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit systemModules;
|
||||
inherit userModules;
|
||||
inherit system;
|
||||
inherit user;
|
||||
inherit hostName;
|
||||
};
|
||||
system = system;
|
||||
# Device specific NixOS Modules
|
||||
modules = systemModules ++ [
|
||||
jovian.nixosModules.jovian
|
||||
./hosts/${hostName}
|
||||
./modules/system/apps-misc
|
||||
./modules/system/browser
|
||||
./modules/system/controller
|
||||
./modules/system/jovian-${hostName}
|
||||
./modules/system/lact
|
||||
./modules/system/plasma
|
||||
./modules/system/retrodeck
|
||||
./modules/system/steam
|
||||
./modules/system/syncthing
|
||||
./modules/system/sddm
|
||||
{
|
||||
# Device specific Home Manager Modules
|
||||
home-manager.users.${user}.imports = userModules ++ [
|
||||
./modules/user/plasma
|
||||
];
|
||||
# Issue with Plasma Manager, has to be imported in a special way
|
||||
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
|
||||
}
|
||||
];
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
jovian,
|
||||
plasma-manager,
|
||||
nix-flatpak,
|
||||
lanzaboote,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# Define system globally since I have no aarch devices
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
lib = nixpkgs.lib;
|
||||
|
||||
# NixOS Modules for all hosts
|
||||
systemModules = [
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
home-manager.nixosModules.home-manager
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
./modules/system/apps-shell
|
||||
./modules/system/boot
|
||||
./modules/system/devices
|
||||
./modules/system/home-manager
|
||||
./modules/system/locale
|
||||
./modules/system/networking
|
||||
./modules/system/nixsettings
|
||||
./modules/system/shell
|
||||
./modules/system/systemversion
|
||||
./modules/system/upgrades
|
||||
./modules/system/users
|
||||
];
|
||||
|
||||
# Home Manager Modules for all hosts
|
||||
userModules = [
|
||||
./modules/user/git
|
||||
./modules/user/homeversion
|
||||
./modules/user/shell
|
||||
];
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
# Workstation config
|
||||
workstation =
|
||||
let
|
||||
user = "mo";
|
||||
hostName = "workstation";
|
||||
in
|
||||
lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit systemModules;
|
||||
inherit userModules;
|
||||
inherit system;
|
||||
inherit user;
|
||||
inherit hostName;
|
||||
};
|
||||
};
|
||||
system = system;
|
||||
# Device specific NixOS Modules
|
||||
modules = systemModules ++ [
|
||||
jovian.nixosModules.jovian
|
||||
./hosts/${hostName}
|
||||
./modules/system/ai
|
||||
./modules/system/apps-misc
|
||||
./modules/system/browser
|
||||
./modules/system/controller
|
||||
./modules/system/flatpak
|
||||
./modules/system/jovian-${hostName}
|
||||
./modules/system/lact
|
||||
./modules/system/plasma
|
||||
./modules/system/retrodeck
|
||||
./modules/system/steam
|
||||
./modules/system/syncthing
|
||||
./modules/system/sddm
|
||||
{
|
||||
# Device specific Home Manager Modules
|
||||
home-manager.users.${user}.imports = userModules ++ [
|
||||
./modules/user/plasma
|
||||
];
|
||||
# Issue with Plasma Manager, has to be imported in a special way
|
||||
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Steamdeck config
|
||||
# user and hostName variable inside hostConfig so we can call it in other modules
|
||||
steamdeck =
|
||||
let
|
||||
user = "deck";
|
||||
@ -119,6 +128,7 @@
|
||||
./modules/system/apps-misc
|
||||
./modules/system/browser
|
||||
./modules/system/controller
|
||||
./modules/system/flatpak
|
||||
./modules/system/jovian-${hostName}
|
||||
./modules/system/lact
|
||||
./modules/system/plasma
|
||||
@ -136,6 +146,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
# Konsole config
|
||||
konsole =
|
||||
let
|
||||
user = "deck";
|
||||
@ -157,6 +168,7 @@
|
||||
./modules/system/apps-misc
|
||||
./modules/system/browser
|
||||
./modules/system/controller
|
||||
./modules/system/flatpak
|
||||
./modules/system/jovian-${hostName}
|
||||
./modules/system/lact
|
||||
./modules/system/plasma
|
||||
@ -174,7 +186,8 @@
|
||||
];
|
||||
};
|
||||
|
||||
server =
|
||||
# Server config
|
||||
server =
|
||||
let
|
||||
user = "administrator";
|
||||
hostName = "server";
|
||||
@ -195,14 +208,12 @@
|
||||
./modules/system/syncthing
|
||||
{
|
||||
# Device specific Home Manager Modules
|
||||
home-manager.users.${user}.imports = userModules ++ [
|
||||
];
|
||||
home-manager.users.${user}.imports = userModules;
|
||||
# Issue with Plasma Manager, has to be imported in a special way
|
||||
home-manager.sharedModules = [];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
15
modules/system/ai/default.nix
Normal file
15
modules/system/ai/default.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.alpaca
|
||||
];
|
||||
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "rocm";
|
||||
environmentVariables = {
|
||||
HCC_AMDGPU_TARGET = "gfx1100";
|
||||
HSA_OVERRIDE_GFX_VERSION="11.0.0";
|
||||
};
|
||||
};
|
||||
}
|
@ -6,5 +6,4 @@
|
||||
boot.plymouth.theme = "bgrt";
|
||||
boot.consoleLogLevel = 0;
|
||||
boot.kernelParams = [ "quiet" "udev.log_level=0" ];
|
||||
boot.initrd.verbose = false;
|
||||
}
|
||||
|
5
modules/system/flatpak/default.nix
Normal file
5
modules/system/flatpak/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.flatpak.enable = true;
|
||||
services.flatpak.update.onActivation = true;
|
||||
}
|
@ -1,7 +1,5 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.flatpak.enable = true;
|
||||
services.flatpak.update.onActivation = true;
|
||||
services.flatpak.packages = [
|
||||
{ appId = "net.retrodeck.retrodeck"; origin = "flathub"; }
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user