diff --git a/configuration.nix b/configuration.nix index 9ceb079..b6f4909 100644 --- a/configuration.nix +++ b/configuration.nix @@ -10,12 +10,14 @@ ./hardware-configuration.nix ./boot.nix ./networking.nix - ./gui.nix + #./gui.nix ./users.nix ./packages.nix ./services.nix ]; + nixpkgs.config.allowUnfree = true; + # Set your time zone. time.timeZone = "America/Chicago"; diff --git a/flake.lock b/flake.lock index 0448020..3b6de63 100644 --- a/flake.lock +++ b/flake.lock @@ -46,37 +46,37 @@ "determinate-nixd-aarch64-darwin": { "flake": false, "locked": { - "narHash": "sha256-g1r0dPwlUi1h96c4BuHzv9M2lWDqRy9bPDW9tRSq35I=", + "narHash": "sha256-6PWoqx52nvlWzlElTjcn7KAPKitfcKZYEFSsC3PoEoE=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.2/macOS" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.14.0/macOS" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.2/macOS" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.14.0/macOS" } }, "determinate-nixd-aarch64-linux": { "flake": false, "locked": { - "narHash": "sha256-xn324irXG/EpUdUfUGFrlJNg23JN2cVArd5LsFPjGKc=", + "narHash": "sha256-b1e25BUPL7Qf0QVbYlfZ/+QiClrP/SHIjMPtA47aOLc=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.2/aarch64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.14.0/aarch64-linux" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.2/aarch64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.14.0/aarch64-linux" } }, "determinate-nixd-x86_64-linux": { "flake": false, "locked": { - "narHash": "sha256-VPM5FOGwEjl56b7Edvg3sduvauPHCyXZ11fN9hcUdTU=", + "narHash": "sha256-8EI2f8IftPcRFlR6K4+cpIEAVf5UIeMCjHysEtVqDw0=", "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.2/x86_64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.14.0/x86_64-linux" }, "original": { "type": "file", - "url": "https://install.determinate.systems/determinate-nixd/tag/v3.13.2/x86_64-linux" + "url": "https://install.determinate.systems/determinate-nixd/tag/v3.14.0/x86_64-linux" } }, "determinite": { @@ -90,12 +90,12 @@ ] }, "locked": { - "lastModified": 1763536872, - "narHash": "sha256-QCYGGghBya+qsY59f1zzgYzxEzz+N9S7YRkVWDIDbgo=", - "rev": "f4e598cbb10021c93f73dd4c0cf01ec791ea53f9", - "revCount": 315, + "lastModified": 1765254444, + "narHash": "sha256-kAO/ZeBnjaF+uqOP6qweXlRk2ylocLuv/9Dn8FsuPlU=", + "rev": "3ccc0297525e51ac3d7905509e0616c9c8350108", + "revCount": 316, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.13.2/019a9b01-c0c6-7e1c-959e-98ac5b7675de/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/determinate/3.14.0/019b0160-c5de-7941-9c26-cb47bc17eec3/source.tar.gz" }, "original": { "type": "tarball", @@ -230,11 +230,11 @@ ] }, "locked": { - "lastModified": 1764776959, - "narHash": "sha256-d+5CGloq7Lo1u2SkzhF8oiOdUc6Z5emh22nTXUB9CFA=", + "lastModified": 1765384171, + "narHash": "sha256-FuFtkJrW1Z7u+3lhzPRau69E0CNjADku1mLQQflUORo=", "owner": "nix-community", "repo": "home-manager", - "rev": "e1680d594a9281651cbf7d126941a8c8e2396183", + "rev": "44777152652bc9eacf8876976fa72cc77ca8b9d8", "type": "github" }, "original": { @@ -253,12 +253,12 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1763534330, - "narHash": "sha256-gTuB2qBdSKCKnZwENTqScs/pPBaZQOv6zZ1KJvV/ohk=", - "rev": "be871f9baf5366a220b5f25634eebab6f452a017", - "revCount": 23278, + "lastModified": 1765252170, + "narHash": "sha256-p98D44tYJMgB5Qet5S8cTQFdffk/GmoaGkpQtZ3hqJU=", + "rev": "1ddd28880651054346c34009d7bb9de36f1db2c1", + "revCount": 23362, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.13.2/019a9af6-3d7b-71bc-bccd-8b18e147ad77/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/nix-src/3.14.0/019b0159-8907-7fab-a120-9d287c7e6d2e/source.tar.gz" }, "original": { "type": "tarball", @@ -315,11 +315,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1764667669, - "narHash": "sha256-7WUCZfmqLAssbDqwg9cUDAXrSoXN79eEEq17qhTNM/Y=", + "lastModified": 1765186076, + "narHash": "sha256-hM20uyap1a0M9d344I692r+ik4gTMyj60cQWO+hAYP8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "418468ac9527e799809c900eda37cbff999199b6", + "rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8", "type": "github" }, "original": { @@ -345,11 +345,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1764522689, - "narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=", + "lastModified": 1765311797, + "narHash": "sha256-mSD5Ob7a+T2RNjvPvOA1dkJHGVrNVl8ZOrAwBjKBDQo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f", + "rev": "09eb77e94fa25202af8f3e81ddc7353d9970ac1b", "type": "github" }, "original": { @@ -361,11 +361,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1759417375, - "narHash": "sha256-O7eHcgkQXJNygY6AypkF9tFhsoDQjpNEojw3eFs73Ow=", + "lastModified": 1764947035, + "narHash": "sha256-EYHSjVM4Ox4lvCXUMiKKs2vETUSL5mx+J2FfutM7T9w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "dc704e6102e76aad573f63b74c742cd96f8f1e6c", + "rev": "a672be65651c80d3f592a89b3945466584a22069", "type": "github" }, "original": { @@ -382,11 +382,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1763988335, - "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", + "lastModified": 1765464257, + "narHash": "sha256-dixPWKiHzh80PtD0aLuxYNQ0xP+843dfXG/yM3OzaYQ=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", + "rev": "09e45f2598e1a8499c3594fe11ec2943f34fe509", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 04f53ad..16c0299 100644 --- a/flake.nix +++ b/flake.nix @@ -28,21 +28,6 @@ , ... }@inputs: let - system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - config.allowUnfreePredicate = - pkg: - builtins.elem (pkgs.lib.getName pkg) [ - "jetbrains-toolbox" - "jetbrains.rust-rover" - "rust-rover" - "discord" - "google-chrome" - "slack" - ]; - }; - unstable = import nixpkgs-unstable { inherit system; }; supportedSystems = [ "x86_64-linux" "aarch64-linux" @@ -52,9 +37,12 @@ forAllSystems = nixpkgs.lib.genAttrs supportedSystems; in { - nixosConfigurations.odin = inputs.nixpkgs.lib.nixosSystem { + nixosConfigurations.odin = inputs.nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; - specialArgs = { inherit unstable inputs home-manager; }; + specialArgs = { + inherit inputs; + unstable = nixpkgs-unstable.legacyPackages.${system}; + }; modules = [ determinite.nixosModules.default ./configuration.nix @@ -65,7 +53,8 @@ home-manager.useUserPackages = true; home-manager.users.noah = ./home.nix; home-manager.extraSpecialArgs = { - inherit unstable; + inherit inputs; + unstable = nixpkgs-unstable.legacyPackages.x86_64-linux; }; # Optionally, use home-manager.extraSpecialArgs to pass @@ -73,19 +62,18 @@ } ]; }; - homeConfigurations."noah" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - - # Specify your home configuration modules here, for example, - # the path to your home.nix. - modules = [ ./home.nix ]; - - # Optionally use extraSpecialArgs - # to pass through arguments to home.nix - extraSpecialArgs = { - inherit unstable; - }; - }; + #homeConfigurations."noah" = home-manager.lib.homeManagerConfiguration { + # # Specify your home configuration modules here, for example, + # # the path to your home.nix. + # modules = [ ./home.nix ]; + # # Optionally use extraSpecialArgs + # # to pass through arguments to home.nix + # extraSpecialArgs = { + # inherit inputs; + # # TODO(ngp): figure out how to avoid double speccifying the platform here + # unstable = nixpkgs-unstable.legacyPackages.x86_64-linux; + # }; + #}; checks = forAllSystems (system: { pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { src = ./.; @@ -102,11 +90,11 @@ default = nixpkgs.legacyPackages.${system}.mkShell { inherit (self.checks.${system}.pre-commit-check) shellHook; buildInputs = [ - pkgs.nixfmt-rfc-style + nixpkgs.legacyPackages.${system}.nixfmt-rfc-style ] ++ self.checks.${system}.pre-commit-check.enabledPackages; }; }); - formatter.${system} = inputs.nixpkgs.legacyPackages.${system}.nixfmt-rfc-style; + formatter = forAllSystems (system: inputs.nixpkgs.legacyPackages.${system}.nixfmt-rfc-style); }; } diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 5b858b2..8e73427 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -47,7 +47,7 @@ boot.kernel.sysctl."net.core.wmem_default" = 134217728; boot.kernel.sysctl."net.core.wmem_max" = 134217728; boot.kernel.sysctl."vm.max_map_count" = 1000000; - boot.kernel.sysctl."fx.nr_open" = 1000000; + boot.kernel.sysctl."fs.nr_open" = 1000000; # 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 diff --git a/packages.nix b/packages.nix index b15d80d..02631c6 100644 --- a/packages.nix +++ b/packages.nix @@ -63,6 +63,7 @@ in plan9port vis rc + ncdu smartmontools diff --git a/users.nix b/users.nix index 03470ec..751d264 100644 --- a/users.nix +++ b/users.nix @@ -1,4 +1,7 @@ -{ pkgs, lib, ... }: +{ pkgs +, lib +, ... +}: { # PAM configuration @@ -22,22 +25,30 @@ # Users must be declared either as part of a package or in this file. users.mutableUsers = false; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.noah = { isNormalUser = true; shell = pkgs.fish; - extraGroups = [ "wheel" "video" "nas" "libvirtd" "qemu-libvirtd" "docker" ]; # Enable ‘sudo’ for the user. + extraGroups = [ + "wheel" + "video" + "nas" + "libvirtd" + "qemu-libvirtd" + "docker" + ]; # Enable ‘sudo’ for the user. hashedPasswordFile = "/etc/nixos/noah-password"; - openssh.authorizedKeys.keys = - lib.strings.splitString "\n" (builtins.readFile (builtins.fetchurl { - url = "https://meta.sr.ht/~chiefnoah.keys"; - name = "chiefnoah.keys"; - # Update this with: - # `curl https://meta.sr.ht/~chiefnoah.keys | sha256sum` - sha256 = "0aky26a91sxpydzd5bpmsgw2bm92mw793k72apf9niaxlx84qq44"; - })); + openssh.authorizedKeys.keys = lib.strings.splitString "\n" ( + builtins.readFile ( + builtins.fetchurl { + url = "https://meta.sr.ht/~chiefnoah.keys"; + name = "chiefnoah.keys"; + # Update this with: + # `curl https://meta.sr.ht/~chiefnoah.keys | sha256sum` + sha256 = "0wdnx25blqihbgaa0hzd39mjqwki92ambar097hjfmlrxg1s4lk7"; + } + ) + ); }; - users.groups.nas.gid = 1001; }