diff --git a/flake.lock b/flake.lock index fea8e52..c3ccb91 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,25 @@ { "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737669579, + "narHash": "sha256-v9WQ3c4ctwPMfdBZMZxpdM9xXev4uChce4BxOpvsu0E=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "7b9ece1bf3c8780cde9b975b28c2d9ccd7e9cdb9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1737469691, @@ -18,6 +38,7 @@ }, "root": { "inputs": { + "home-manager": "home-manager", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 6e6373e..375ce5f 100644 --- a/flake.nix +++ b/flake.nix @@ -3,17 +3,22 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = - { self, nixpkgs }: + { nixpkgs, home-manager, ... }: { nixosConfigurations = { "20212060" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ ./machines/laptop.nix - ../hardware-configuration.nix + home-manager.nixosModules.home-manager + { } ]; }; }; diff --git a/machines/laptop.nix b/machines/laptop.nix index b1f6eff..a68ef94 100644 --- a/machines/laptop.nix +++ b/machines/laptop.nix @@ -1,4 +1,4 @@ -{ ... }: +{ lib, ... }: { imports = [ @@ -27,5 +27,35 @@ sudo = true; configuration = ../users/jan.nix; }; + + # Hardware configuration + hardware.enableRedistributableFirmware = true; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "nvme" + "usb_storage" + "sd_mod" + "rtsx_pci_sdmmc" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + swapDevices = [ ]; + hardware.cpu.intel.updateMicrocode = true; + + # Filesystems + fileSystems."/" = { + device = "/dev/disk/by-uuid/3b91eaeb-ea95-4bea-8dc1-f55af7502d23"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/46BF-DE2C"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; }; } diff --git a/modules/base/default.nix b/modules/base/default.nix index ce1e08a..c668632 100644 --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -82,6 +82,8 @@ in "nvidia-settings" ]; nix.settings.experimental-features = "nix-command flakes"; + networking.useDHCP = true; + nixpkgs.hostPlatform = "x86_64-linux"; # TODO: Move to USB module # services.gvfs.enable = true; diff --git a/modules/users/default.nix b/modules/users/default.nix index 2218a73..9a26208 100644 --- a/modules/users/default.nix +++ b/modules/users/default.nix @@ -56,10 +56,10 @@ in { imports = [ # Import home manager - + # # Import system wide configuration required for user modules - ./modules/systemwide/default.nix + ../../user-modules/systemwide/default.nix ]; options = { @@ -85,7 +85,7 @@ in nixvim.homeManagerModules.nixvim # Modules - ./modules/default.nix + ../../user-modules/default.nix # Custom packages ../../pkgs/default.nix diff --git a/modules/users/modules/bluetuith/default.nix b/user-modules/bluetuith/default.nix similarity index 100% rename from modules/users/modules/bluetuith/default.nix rename to user-modules/bluetuith/default.nix diff --git a/modules/users/modules/browser/default.nix b/user-modules/browser/default.nix similarity index 100% rename from modules/users/modules/browser/default.nix rename to user-modules/browser/default.nix diff --git a/modules/users/modules/browser/firefox/default.nix b/user-modules/browser/firefox/default.nix similarity index 100% rename from modules/users/modules/browser/firefox/default.nix rename to user-modules/browser/firefox/default.nix diff --git a/modules/users/modules/browser/firefox/userChrome.css b/user-modules/browser/firefox/userChrome.css similarity index 100% rename from modules/users/modules/browser/firefox/userChrome.css rename to user-modules/browser/firefox/userChrome.css diff --git a/modules/users/modules/browser/firefox/userContent.css b/user-modules/browser/firefox/userContent.css similarity index 100% rename from modules/users/modules/browser/firefox/userContent.css rename to user-modules/browser/firefox/userContent.css diff --git a/modules/users/modules/browser/qutebrowser/default.nix b/user-modules/browser/qutebrowser/default.nix similarity index 100% rename from modules/users/modules/browser/qutebrowser/default.nix rename to user-modules/browser/qutebrowser/default.nix diff --git a/modules/users/modules/btop/default.nix b/user-modules/btop/default.nix similarity index 100% rename from modules/users/modules/btop/default.nix rename to user-modules/btop/default.nix diff --git a/modules/users/modules/default.nix b/user-modules/default.nix similarity index 100% rename from modules/users/modules/default.nix rename to user-modules/default.nix diff --git a/modules/users/modules/desktop/background/glpaper/default.nix b/user-modules/desktop/background/glpaper/default.nix similarity index 100% rename from modules/users/modules/desktop/background/glpaper/default.nix rename to user-modules/desktop/background/glpaper/default.nix diff --git a/modules/users/modules/desktop/background/glpaper/shaders/galaxy.glsl b/user-modules/desktop/background/glpaper/shaders/galaxy.glsl similarity index 100% rename from modules/users/modules/desktop/background/glpaper/shaders/galaxy.glsl rename to user-modules/desktop/background/glpaper/shaders/galaxy.glsl diff --git a/modules/users/modules/desktop/background/glpaper/shaders/next.glsl b/user-modules/desktop/background/glpaper/shaders/next.glsl similarity index 100% rename from modules/users/modules/desktop/background/glpaper/shaders/next.glsl rename to user-modules/desktop/background/glpaper/shaders/next.glsl diff --git a/modules/users/modules/desktop/background/glpaper/shaders/shadertoy.glsl b/user-modules/desktop/background/glpaper/shaders/shadertoy.glsl similarity index 100% rename from modules/users/modules/desktop/background/glpaper/shaders/shadertoy.glsl rename to user-modules/desktop/background/glpaper/shaders/shadertoy.glsl diff --git a/modules/users/modules/desktop/background/glpaper/shaders/water.glsl b/user-modules/desktop/background/glpaper/shaders/water.glsl similarity index 100% rename from modules/users/modules/desktop/background/glpaper/shaders/water.glsl rename to user-modules/desktop/background/glpaper/shaders/water.glsl diff --git a/modules/users/modules/desktop/background/glpaper/shaders/waves.glsl b/user-modules/desktop/background/glpaper/shaders/waves.glsl similarity index 100% rename from modules/users/modules/desktop/background/glpaper/shaders/waves.glsl rename to user-modules/desktop/background/glpaper/shaders/waves.glsl diff --git a/modules/users/modules/desktop/bar/waybar.nix b/user-modules/desktop/bar/waybar.nix similarity index 100% rename from modules/users/modules/desktop/bar/waybar.nix rename to user-modules/desktop/bar/waybar.nix diff --git a/modules/users/modules/desktop/default.nix b/user-modules/desktop/default.nix similarity index 100% rename from modules/users/modules/desktop/default.nix rename to user-modules/desktop/default.nix diff --git a/modules/users/modules/desktop/lock-screen/waylock.nix b/user-modules/desktop/lock-screen/waylock.nix similarity index 100% rename from modules/users/modules/desktop/lock-screen/waylock.nix rename to user-modules/desktop/lock-screen/waylock.nix diff --git a/modules/users/modules/desktop/window-manager/river.nix b/user-modules/desktop/window-manager/river.nix similarity index 100% rename from modules/users/modules/desktop/window-manager/river.nix rename to user-modules/desktop/window-manager/river.nix diff --git a/modules/users/modules/development/default.nix b/user-modules/development/default.nix similarity index 100% rename from modules/users/modules/development/default.nix rename to user-modules/development/default.nix diff --git a/modules/users/modules/development/utilities/docker.nix b/user-modules/development/utilities/docker.nix similarity index 100% rename from modules/users/modules/development/utilities/docker.nix rename to user-modules/development/utilities/docker.nix diff --git a/modules/users/modules/discord/default.nix b/user-modules/discord/default.nix similarity index 100% rename from modules/users/modules/discord/default.nix rename to user-modules/discord/default.nix diff --git a/modules/users/modules/feishin/default.nix b/user-modules/feishin/default.nix similarity index 100% rename from modules/users/modules/feishin/default.nix rename to user-modules/feishin/default.nix diff --git a/modules/users/modules/fontconfig/default.nix b/user-modules/fontconfig/default.nix similarity index 100% rename from modules/users/modules/fontconfig/default.nix rename to user-modules/fontconfig/default.nix diff --git a/modules/users/modules/games/modrinth.nix b/user-modules/games/modrinth.nix similarity index 100% rename from modules/users/modules/games/modrinth.nix rename to user-modules/games/modrinth.nix diff --git a/modules/users/modules/git/default.nix b/user-modules/git/default.nix similarity index 100% rename from modules/users/modules/git/default.nix rename to user-modules/git/default.nix diff --git a/modules/users/modules/language/cpp.nix b/user-modules/language/cpp.nix similarity index 100% rename from modules/users/modules/language/cpp.nix rename to user-modules/language/cpp.nix diff --git a/modules/users/modules/language/haskell.nix b/user-modules/language/haskell.nix similarity index 100% rename from modules/users/modules/language/haskell.nix rename to user-modules/language/haskell.nix diff --git a/modules/users/modules/language/js.nix b/user-modules/language/js.nix similarity index 100% rename from modules/users/modules/language/js.nix rename to user-modules/language/js.nix diff --git a/modules/users/modules/language/jupyter.nix b/user-modules/language/jupyter.nix similarity index 100% rename from modules/users/modules/language/jupyter.nix rename to user-modules/language/jupyter.nix diff --git a/modules/users/modules/language/nix.nix b/user-modules/language/nix.nix similarity index 100% rename from modules/users/modules/language/nix.nix rename to user-modules/language/nix.nix diff --git a/modules/users/modules/language/python.nix b/user-modules/language/python.nix similarity index 100% rename from modules/users/modules/language/python.nix rename to user-modules/language/python.nix diff --git a/modules/users/modules/language/rust.nix b/user-modules/language/rust.nix similarity index 100% rename from modules/users/modules/language/rust.nix rename to user-modules/language/rust.nix diff --git a/modules/users/modules/language/tex.nix b/user-modules/language/tex.nix similarity index 100% rename from modules/users/modules/language/tex.nix rename to user-modules/language/tex.nix diff --git a/modules/users/modules/mako/default.nix b/user-modules/mako/default.nix similarity index 100% rename from modules/users/modules/mako/default.nix rename to user-modules/mako/default.nix diff --git a/modules/users/modules/neovim/default.nix b/user-modules/neovim/default.nix similarity index 100% rename from modules/users/modules/neovim/default.nix rename to user-modules/neovim/default.nix diff --git a/modules/users/modules/obsidian/default.nix b/user-modules/obsidian/default.nix similarity index 100% rename from modules/users/modules/obsidian/default.nix rename to user-modules/obsidian/default.nix diff --git a/modules/users/modules/rofi/default.nix b/user-modules/rofi/default.nix similarity index 100% rename from modules/users/modules/rofi/default.nix rename to user-modules/rofi/default.nix diff --git a/modules/users/modules/rofi/rofi-rbw.nix b/user-modules/rofi/rofi-rbw.nix similarity index 100% rename from modules/users/modules/rofi/rofi-rbw.nix rename to user-modules/rofi/rofi-rbw.nix diff --git a/modules/users/modules/shell/bash.nix b/user-modules/shell/bash.nix similarity index 100% rename from modules/users/modules/shell/bash.nix rename to user-modules/shell/bash.nix diff --git a/modules/users/modules/shell/default.nix b/user-modules/shell/default.nix similarity index 100% rename from modules/users/modules/shell/default.nix rename to user-modules/shell/default.nix diff --git a/modules/users/modules/shell/fish.nix b/user-modules/shell/fish.nix similarity index 100% rename from modules/users/modules/shell/fish.nix rename to user-modules/shell/fish.nix diff --git a/modules/users/modules/spotify/default.nix b/user-modules/spotify/default.nix similarity index 100% rename from modules/users/modules/spotify/default.nix rename to user-modules/spotify/default.nix diff --git a/modules/users/modules/steam/default.nix b/user-modules/steam/default.nix similarity index 100% rename from modules/users/modules/steam/default.nix rename to user-modules/steam/default.nix diff --git a/modules/users/modules/systemwide/default.nix b/user-modules/systemwide/default.nix similarity index 100% rename from modules/users/modules/systemwide/default.nix rename to user-modules/systemwide/default.nix diff --git a/modules/users/modules/systemwide/docker.nix b/user-modules/systemwide/docker.nix similarity index 100% rename from modules/users/modules/systemwide/docker.nix rename to user-modules/systemwide/docker.nix diff --git a/modules/users/modules/systemwide/river.nix b/user-modules/systemwide/river.nix similarity index 100% rename from modules/users/modules/systemwide/river.nix rename to user-modules/systemwide/river.nix diff --git a/modules/users/modules/systemwide/steam.nix b/user-modules/systemwide/steam.nix similarity index 100% rename from modules/users/modules/systemwide/steam.nix rename to user-modules/systemwide/steam.nix diff --git a/modules/users/modules/systemwide/waylock.nix b/user-modules/systemwide/waylock.nix similarity index 100% rename from modules/users/modules/systemwide/waylock.nix rename to user-modules/systemwide/waylock.nix diff --git a/modules/users/modules/terminal/default.nix b/user-modules/terminal/default.nix similarity index 100% rename from modules/users/modules/terminal/default.nix rename to user-modules/terminal/default.nix diff --git a/modules/users/modules/terminal/foot/default.nix b/user-modules/terminal/foot/default.nix similarity index 100% rename from modules/users/modules/terminal/foot/default.nix rename to user-modules/terminal/foot/default.nix diff --git a/modules/users/modules/theming/default.nix b/user-modules/theming/default.nix similarity index 100% rename from modules/users/modules/theming/default.nix rename to user-modules/theming/default.nix diff --git a/modules/users/modules/theming/fonts/cozette-vector.nix b/user-modules/theming/fonts/cozette-vector.nix similarity index 100% rename from modules/users/modules/theming/fonts/cozette-vector.nix rename to user-modules/theming/fonts/cozette-vector.nix diff --git a/modules/users/modules/theming/fonts/cozette.nix b/user-modules/theming/fonts/cozette.nix similarity index 100% rename from modules/users/modules/theming/fonts/cozette.nix rename to user-modules/theming/fonts/cozette.nix diff --git a/modules/users/modules/theming/fonts/dejavu-sans.nix b/user-modules/theming/fonts/dejavu-sans.nix similarity index 100% rename from modules/users/modules/theming/fonts/dejavu-sans.nix rename to user-modules/theming/fonts/dejavu-sans.nix diff --git a/modules/users/modules/theming/fonts/dejavu-serif.nix b/user-modules/theming/fonts/dejavu-serif.nix similarity index 100% rename from modules/users/modules/theming/fonts/dejavu-serif.nix rename to user-modules/theming/fonts/dejavu-serif.nix diff --git a/modules/users/modules/theming/fonts/dina.nix b/user-modules/theming/fonts/dina.nix similarity index 100% rename from modules/users/modules/theming/fonts/dina.nix rename to user-modules/theming/fonts/dina.nix diff --git a/modules/users/modules/theming/fonts/fira-code.nix b/user-modules/theming/fonts/fira-code.nix similarity index 100% rename from modules/users/modules/theming/fonts/fira-code.nix rename to user-modules/theming/fonts/fira-code.nix diff --git a/modules/users/modules/theming/fonts/nerd-fonts-symbols.nix b/user-modules/theming/fonts/nerd-fonts-symbols.nix similarity index 100% rename from modules/users/modules/theming/fonts/nerd-fonts-symbols.nix rename to user-modules/theming/fonts/nerd-fonts-symbols.nix diff --git a/modules/users/modules/theming/fonts/noto-color-emoji.nix b/user-modules/theming/fonts/noto-color-emoji.nix similarity index 100% rename from modules/users/modules/theming/fonts/noto-color-emoji.nix rename to user-modules/theming/fonts/noto-color-emoji.nix diff --git a/modules/users/modules/theming/fonts/wqy-bitmapsong.nix b/user-modules/theming/fonts/wqy-bitmapsong.nix similarity index 100% rename from modules/users/modules/theming/fonts/wqy-bitmapsong.nix rename to user-modules/theming/fonts/wqy-bitmapsong.nix diff --git a/modules/users/modules/theming/fonts/wqy-microhei-mono.nix b/user-modules/theming/fonts/wqy-microhei-mono.nix similarity index 100% rename from modules/users/modules/theming/fonts/wqy-microhei-mono.nix rename to user-modules/theming/fonts/wqy-microhei-mono.nix diff --git a/modules/users/modules/theming/fonts/wqy-microhei.nix b/user-modules/theming/fonts/wqy-microhei.nix similarity index 100% rename from modules/users/modules/theming/fonts/wqy-microhei.nix rename to user-modules/theming/fonts/wqy-microhei.nix diff --git a/modules/users/modules/theming/fonts/wqy-zenhei-mono.nix b/user-modules/theming/fonts/wqy-zenhei-mono.nix similarity index 100% rename from modules/users/modules/theming/fonts/wqy-zenhei-mono.nix rename to user-modules/theming/fonts/wqy-zenhei-mono.nix diff --git a/modules/users/modules/theming/fonts/wqy-zenhei-sharp.nix b/user-modules/theming/fonts/wqy-zenhei-sharp.nix similarity index 100% rename from modules/users/modules/theming/fonts/wqy-zenhei-sharp.nix rename to user-modules/theming/fonts/wqy-zenhei-sharp.nix diff --git a/modules/users/modules/theming/fonts/wqy-zenhei.nix b/user-modules/theming/fonts/wqy-zenhei.nix similarity index 100% rename from modules/users/modules/theming/fonts/wqy-zenhei.nix rename to user-modules/theming/fonts/wqy-zenhei.nix diff --git a/modules/users/modules/theming/themes/catppuccin.nix b/user-modules/theming/themes/catppuccin.nix similarity index 100% rename from modules/users/modules/theming/themes/catppuccin.nix rename to user-modules/theming/themes/catppuccin.nix diff --git a/modules/users/modules/theming/themes/gruvbox.nix b/user-modules/theming/themes/gruvbox.nix similarity index 100% rename from modules/users/modules/theming/themes/gruvbox.nix rename to user-modules/theming/themes/gruvbox.nix diff --git a/modules/users/modules/theming/themes/nord.nix b/user-modules/theming/themes/nord.nix similarity index 100% rename from modules/users/modules/theming/themes/nord.nix rename to user-modules/theming/themes/nord.nix diff --git a/modules/users/modules/theming/themes/oxocarbon.nix b/user-modules/theming/themes/oxocarbon.nix similarity index 100% rename from modules/users/modules/theming/themes/oxocarbon.nix rename to user-modules/theming/themes/oxocarbon.nix diff --git a/modules/users/modules/theming/themes/papercolor.nix b/user-modules/theming/themes/papercolor.nix similarity index 100% rename from modules/users/modules/theming/themes/papercolor.nix rename to user-modules/theming/themes/papercolor.nix diff --git a/modules/users/modules/theming/themes/sakura.nix b/user-modules/theming/themes/sakura.nix similarity index 100% rename from modules/users/modules/theming/themes/sakura.nix rename to user-modules/theming/themes/sakura.nix diff --git a/modules/users/modules/vscode/default.nix b/user-modules/vscode/default.nix similarity index 100% rename from modules/users/modules/vscode/default.nix rename to user-modules/vscode/default.nix diff --git a/modules/users/modules/whatsapp/default.nix b/user-modules/whatsapp/default.nix similarity index 100% rename from modules/users/modules/whatsapp/default.nix rename to user-modules/whatsapp/default.nix diff --git a/modules/users/modules/winbox/default.nix b/user-modules/winbox/default.nix similarity index 100% rename from modules/users/modules/winbox/default.nix rename to user-modules/winbox/default.nix diff --git a/modules/users/modules/zathura/default.nix b/user-modules/zathura/default.nix similarity index 100% rename from modules/users/modules/zathura/default.nix rename to user-modules/zathura/default.nix