diff --git a/flake.lock b/flake.lock index 3909dce..81de792 100644 --- a/flake.lock +++ b/flake.lock @@ -102,14 +102,17 @@ }, "flake-parts": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib" + "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] }, "locked": { - "lastModified": 1749398372, - "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", + "lastModified": 1763759067, + "narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", + "rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0", "type": "github" }, "original": { @@ -119,27 +122,6 @@ } }, "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "nixvim", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1762440070, - "narHash": "sha256-xxdepIcb39UJ94+YydGP221rjnpkDZUlykKuF54PsqI=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "26d05891e14c88eb4a5d5bee659c0db5afb609d8", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -162,11 +144,7 @@ }, "flake-utils": { "inputs": { - "systems": [ - "mango", - "scenefx", - "systems" - ] + "systems": "systems" }, "locked": { "lastModified": 1731533236, @@ -200,24 +178,6 @@ "type": "github" } }, - "flake-utils_3": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "fromYaml": { "flake": false, "locked": { @@ -259,18 +219,20 @@ "gnome-shell": { "flake": false, "locked": { - "lastModified": 1748186689, - "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", + "host": "gitlab.gnome.org", + "lastModified": 1762869044, + "narHash": "sha256-nwm/GJ2Syigf7VccLAZ66mFC8mZJFqpJmIxSGKl7+Ds=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", - "type": "github" + "rev": "680e3d195a92203f28d4bf8c6e8bb537cc3ed4ad", + "type": "gitlab" }, "original": { + "host": "gitlab.gnome.org", "owner": "GNOME", - "ref": "48.2", + "ref": "gnome-49", "repo": "gnome-shell", - "type": "github" + "type": "gitlab" } }, "home-manager": { @@ -280,11 +242,11 @@ ] }, "locked": { - "lastModified": 1762721397, - "narHash": "sha256-E428EuouA4nFTNlLuqlL4lVR78X+EbBIqDqsBFnB79w=", + "lastModified": 1764603455, + "narHash": "sha256-Q70rxlbrxPcTtqWIb9+71rkJESxIOou5isZBvyOieXw=", "owner": "nix-community", "repo": "home-manager", - "rev": "b8645b18b0f5374127bbade6de7381ef0b3d5720", + "rev": "effe4c007d6243d9e69ce2242d76a2471c1b8d5c", "type": "github" }, "original": { @@ -301,11 +263,11 @@ ] }, "locked": { - "lastModified": 1762351818, - "narHash": "sha256-0ptUDbYwxv1kk/uzEX4+NJjY2e16MaAhtzAOJ6K0TG0=", + "lastModified": 1762964643, + "narHash": "sha256-RYHN8O/Aja59XDji6WSJZPkJpYVUfpSkyH+PEupBJqM=", "owner": "nix-community", "repo": "home-manager", - "rev": "b959c67241cae17fc9e4ee7eaf13dfa8512477ea", + "rev": "827f2a23373a774a8805f84ca5344654c31f354b", "type": "github" }, "original": { @@ -342,31 +304,9 @@ "type": "github" } }, - "mango": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ], - "scenefx": "scenefx" - }, - "locked": { - "lastModified": 1762701589, - "narHash": "sha256-xB9F2URQwqUPX4YU9ggWPLrAvEGegO/Inlvs835lMJg=", - "owner": "DreamMaoMao", - "repo": "mango", - "rev": "d0a51f47856b62ed1d135eaa2a1824377efc85a4", - "type": "github" - }, - "original": { - "owner": "DreamMaoMao", - "repo": "mango", - "type": "github" - } - }, "nix-wallpaper": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" ], @@ -388,11 +328,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1762596750, - "narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=", + "lastModified": 1764517877, + "narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e", + "rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c", "type": "github" }, "original": { @@ -402,36 +342,21 @@ "type": "github" } }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1748740939, - "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "656a64127e9d791a334452c6b6606d17539476e2", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, "nixvim": { "inputs": { - "flake-parts": "flake-parts_2", + "flake-parts": "flake-parts", "nixpkgs": [ "nixpkgs" ], "nuschtosSearch": "nuschtosSearch", - "systems": "systems_4" + "systems": "systems_3" }, "locked": { - "lastModified": 1762691346, - "narHash": "sha256-dyYnqvYrgViB22inBqNern/XSWtOiweP8NTfJQJeTis=", + "lastModified": 1764611906, + "narHash": "sha256-8UbK91SY+IN93IsA59G1W0IclCCgJ95DhNxi9b1YLHw=", "owner": "nix-community", "repo": "nixvim", - "rev": "faf1fb4b7cd069ce44469e45c3259b7bcf106f81", + "rev": "ee6ccaae42fc032ca4678951b48f92c635cb8ebc", "type": "github" }, "original": { @@ -467,7 +392,7 @@ }, "nuschtosSearch": { "inputs": { - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "ixx": "ixx", "nixpkgs": [ "nixvim", @@ -514,7 +439,6 @@ "root": { "inputs": { "home-manager": "home-manager", - "mango": "mango", "nix-wallpaper": "nix-wallpaper", "nixpkgs": "nixpkgs", "nixvim": "nixvim", @@ -522,29 +446,6 @@ "zen-browser": "zen-browser" } }, - "scenefx": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "mango", - "nixpkgs" - ], - "systems": "systems" - }, - "locked": { - "lastModified": 1762447505, - "narHash": "sha256-VEBQ8KXkSS4c+kdAhmvq06lEd9WNeCXdRK1U+qSilFw=", - "owner": "wlrfx", - "repo": "scenefx", - "rev": "7f9e7409f6169fa637f1265895c121a8f8b70272", - "type": "github" - }, - "original": { - "owner": "wlrfx", - "repo": "scenefx", - "type": "github" - } - }, "stylix": { "inputs": { "base16": "base16", @@ -552,13 +453,13 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts_3", + "flake-parts": "flake-parts_2", "gnome-shell": "gnome-shell", "nixpkgs": [ "nixpkgs" ], "nur": "nur", - "systems": "systems_5", + "systems": "systems_4", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-schemes": "tinted-schemes", @@ -566,11 +467,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1762264356, - "narHash": "sha256-QVfC53Ri+8n3e7Ujx9kq6all3+TLBRRPRnc6No5qY5w=", + "lastModified": 1764550443, + "narHash": "sha256-ArO2V1YEHmEILilTj4KPtqF4gqc1q2HBrrrmygQ/UyU=", "owner": "danth", "repo": "stylix", - "rev": "647bb8dd96a206a1b79c4fd714affc88b409e10b", + "rev": "794b6e1fa75177ebfeb32967f135858a1ab1ba15", "type": "github" }, "original": { @@ -581,16 +482,16 @@ }, "systems": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -639,21 +540,6 @@ "type": "github" } }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tinted-foot": { "flake": false, "locked": { @@ -743,11 +629,11 @@ ] }, "locked": { - "lastModified": 1762721850, - "narHash": "sha256-DM2z2mMtHqo7SQkhTRws538Aa9MUxH3pw6u6ZQrfeKk=", + "lastModified": 1764598958, + "narHash": "sha256-sJQHRL8trBoG/ArR+mUlyp5cyKU0pgQY+qDQzZGnVgM=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "f0c7e6dafa5641880eaa49736526f9101aa0bdb4", + "rev": "8cded25e10b13e2999241f1c73a7d4e5e5d6f69e", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index ff70aab..7ff20e4 100644 --- a/flake.nix +++ b/flake.nix @@ -22,25 +22,36 @@ url = "github:lunik1/nix-wallpaper"; inputs.nixpkgs.follows = "nixpkgs"; }; - mango = { - url = "github:DreamMaoMao/mango"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; outputs = { ... }@inputs: - let - system = "x86_64-linux"; - #pkgs = import inputs.nixpkgs { - # inherit system; - #}; - hostName = "january"; - userName = "autumn"; - in { - nixosConfigurations.${hostName} = inputs.nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; inherit hostName; }; - modules = [ ./nixos/configuration.nix ]; + nixosConfigurations = { + "january" = inputs.nixpkgs.lib.nixosSystem { + specialArgs = { + hostName = "january"; + inherit inputs; + }; + + modules = [ ./host/pc/january/configuration.nix ]; + }; + + "february" = inputs.nixpkgs.lib.nixosSystem { + specialArgs = { + hostName = "february"; + inherit inputs; + + modules = [ ./host/pc/february/configuration.nix ]; + }; + }; + + "march" = inputs.nixpkgs.lib.nixosSystem { + specialArgs = { + hostName = "march"; + }; + + modules = [ ./host/server/march/configuration.nix ]; + }; }; }; } diff --git a/host/pc/common/configuration.nix b/host/pc/common/configuration.nix new file mode 100644 index 0000000..f6393a9 --- /dev/null +++ b/host/pc/common/configuration.nix @@ -0,0 +1,142 @@ +{ + inputs, + hostName, + pkgs, + ... +}: + +{ + imports = [ + inputs.home-manager.nixosModules.home-manager + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.tmp.cleanOnBoot = true; + + nix.package = pkgs.lixPackageSets.latest.lix; + + networking.hostName = "${hostName}"; + + hardware.graphics.enable = true; + + networking.networkmanager.enable = true; + + nixpkgs.config.allowUnfree = true; + + time.timeZone = "America/Toronto"; + + i18n.defaultLocale = "en_CA.UTF-8"; + + services.udev.extraRules = '' + SUBSYSTEMS=="usb", ATTR{idVendor}=="*", MODE:="0666" + KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" + ''; + + home-manager = { + extraSpecialArgs = { inherit inputs; }; + users = { + autumn = import ../../../home/autumn/home.nix; + }; + }; + + services.gnome.glib-networking.enable = true; + + programs.hyprland = { + enable = true; + }; + + services.displayManager.sddm = { + enable = true; + theme = "catppuccin-mocha-mauve"; + wayland.enable = true; + package = pkgs.kdePackages.sddm; + }; + + programs.steam = { + enable = true; + }; + + services.blueman.enable = true; + + services.printing.enable = true; + + services.openssh = { + enable = true; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = false; + }; + }; + + services.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; + + users.users.autumn = { + isNormalUser = true; + description = "Autumn"; + extraGroups = [ + "networkmanager" + "wheel" + ]; + packages = [ ]; + shell = pkgs.nushell; + }; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + programs.dconf.enable = true; + + environment.systemPackages = with pkgs; [ + cloudflared + gparted + networkmanagerapplet + nh + pavucontrol + (pkgs.catppuccin-sddm.override { + flavor = "mocha"; + font = "CaskaydiaCove Nerd Font"; + fontSize = "12"; + }) + wget + ]; + + fonts = { + packages = [ + pkgs.nerd-fonts.caskaydia-cove + ]; + fontconfig = { + defaultFonts = + let + font = "CaskaydiaCove Nerd Font"; + in + { + serif = [ font ]; + sansSerif = [ font ]; + monospace = [ font ]; + emoji = [ font ]; + }; + }; + }; + + environment.sessionVariables = { + EDITOR = "nvim"; + BROWSER = "zen"; + SUDO_EDITOR = "nvim"; + SHELL = "nu"; + }; + + system.stateVersion = "24.05"; +} diff --git a/host/pc/february/configuration.nix b/host/pc/february/configuration.nix new file mode 100644 index 0000000..463206b --- /dev/null +++ b/host/pc/february/configuration.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + imports = [ + ./hardware-configuration.nix + ../common/configuration.nix + ]; +} diff --git a/host/pc/january/configuration.nix b/host/pc/january/configuration.nix new file mode 100644 index 0000000..463206b --- /dev/null +++ b/host/pc/january/configuration.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + imports = [ + ./hardware-configuration.nix + ../common/configuration.nix + ]; +} diff --git a/host/pc/january/hardware-configuration.nix b/host/pc/january/hardware-configuration.nix new file mode 100644 index 0000000..7c5a96d --- /dev/null +++ b/host/pc/january/hardware-configuration.nix @@ -0,0 +1,39 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/90aaba2e-42f2-4b98-8df6-bd4a72f6d688"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/F8E0-7E32"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp10s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp18s0f4u1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nixos/configuration.nix b/host/server/march/configuration.nix similarity index 100% rename from nixos/configuration.nix rename to host/server/march/configuration.nix