From 47342001e0e85b85341d6d7c88234b6d44ff36d3 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Tue, 20 Feb 2024 21:58:32 -0600 Subject: [PATCH] Restructuring config. --- .vscode/extensions.json | 3 + flake.lock | 90 ++----------------- flake.nix | 12 +-- home.nix => home-manager/home.nix | 0 configuration.nix => nixos/configuration.nix | 9 +- .../hardware-configuration.nix | 8 +- 6 files changed, 24 insertions(+), 98 deletions(-) create mode 100644 .vscode/extensions.json rename home.nix => home-manager/home.nix (100%) rename configuration.nix => nixos/configuration.nix (94%) rename hardware-configuration.nix => nixos/hardware-configuration.nix (78%) diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..a1d0759 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["jnoortheen.nix-ide"] +} \ No newline at end of file diff --git a/flake.lock b/flake.lock index ae5acb4..5cdc079 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,5 @@ { "nodes": { - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1698882062, - "narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8c9fa2545007b49a5db5f650ae91f227672c3877", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -25,65 +7,32 @@ ] }, "locked": { - "lastModified": 1707467182, - "narHash": "sha256-/Bw/xgCXfj4nXDd8Xq+r1kaorfsYkkomMf5w5MpsDyA=", + "lastModified": 1706981411, + "narHash": "sha256-cLbLPTL1CDmETVh4p0nQtvoF+FSEjsnJTFpTxhXywhQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "5b9156fa9a8b8beba917b8f9adbfd27bf63e16af", + "rev": "652fda4ca6dafeb090943422c34ae9145787af37", "type": "github" }, "original": { "owner": "nix-community", + "ref": "release-23.11", "repo": "home-manager", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1707451808, - "narHash": "sha256-UwDBUNHNRsYKFJzyTMVMTF5qS4xeJlWoeyJf+6vvamU=", + "lastModified": 1708161998, + "narHash": "sha256-6KnemmUorCvlcAvGziFosAVkrlWZGIc6UNT9GUYr0jQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "442d407992384ed9c0e6d352de75b69079904e4e", + "rev": "84d981bae8b5e783b3b548de505b22880559515f", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "dir": "lib", - "lastModified": 1698611440, - "narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735", - "type": "github" - }, - "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1701068326, - "narHash": "sha256-vmMceA+q6hG1yrjb+MP8T0YFDQIrW3bl45e7z24IEts=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "8cfef6986adfb599ba379ae53c9f5631ecd2fd9c", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } @@ -91,28 +40,7 @@ "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs", - "talhelper": "talhelper" - } - }, - "talhelper": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1703307959, - "narHash": "sha256-cBtbOMPP6uZMsoWZifDPZIudQDJgblQBkkMB9KCSDBI=", - "owner": "budimanjojo", - "repo": "talhelper", - "rev": "6396cd7b1c55416356d3c7209ebe6989cad9375c", - "type": "github" - }, - "original": { - "owner": "budimanjojo", - "ref": "v1.16.4", - "repo": "talhelper", - "type": "github" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index d4446fc..9f9b32d 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "jahanson's NixOS Flake"; + description = "laptop NixOS Flake"; # This is the standard format for flake.nix. # `inputs` are the dependencies of the flake, @@ -11,10 +11,10 @@ # The most widely used is `github:owner/name/reference`, # which represents the GitHub repository URL + branch/commit-id/tag. - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - talhelper.url = "github:budimanjojo/talhelper/v1.16.4"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; + # Home Manager home-manager = { - url = "github:nix-community/home-manager"; + url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; }; }; @@ -29,12 +29,12 @@ # Import the configuration.nix here, so that the # old configuration file can still take effect. # Note: configuration.nix itself is also a Nixpkgs Module, - ./configuration.nix + ./nixos/configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.jahanson = import ./home.nix; + home-manager.users.jahanson = import ./home-manager/home.nix; } ]; }; diff --git a/home.nix b/home-manager/home.nix similarity index 100% rename from home.nix rename to home-manager/home.nix diff --git a/configuration.nix b/nixos/configuration.nix similarity index 94% rename from configuration.nix rename to nixos/configuration.nix index 434b23e..ddf5401 100644 --- a/configuration.nix +++ b/nixos/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running 'nixos-help'). -{ config, pkgs, talhelper, ... }: +{ config, pkgs, ... }: { imports = @@ -35,10 +35,6 @@ networking.hostName = "durincore"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - # Enable networking networking.networkmanager.enable = true; @@ -113,7 +109,6 @@ vivaldi vivaldi-ffmpeg-codecs termius - talhelper.packages."${pkgs.system}".default ]; }; environment.variables.EDITOR = "vim"; @@ -143,7 +138,7 @@ # Some programs need SUID wrappers, can be configured further or are # started in user sessions. - # programs.mtr.enable = true; + programs.mtr.enable = true; # programs.gnupg.agent = { # enable = true; # enableSSHSupport = true; diff --git a/hardware-configuration.nix b/nixos/hardware-configuration.nix similarity index 78% rename from hardware-configuration.nix rename to nixos/hardware-configuration.nix index 26f1b52..61ea5cd 100644 --- a/hardware-configuration.nix +++ b/nixos/hardware-configuration.nix @@ -1,4 +1,4 @@ -# Do not modify this file! It was generated by 'nixos-generate-config' +# 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, ... }: @@ -14,14 +14,14 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/e3e1b7a8-bf44-4b8c-a697-2aa994efe209"; + { device = "/dev/disk/by-uuid/08d03cf3-7fdc-4986-ab3a-b013a2de5c3b"; fsType = "ext4"; }; - boot.initrd.luks.devices."luks-63960cf7-ce95-4e7d-8177-30bac148f890".device = "/dev/disk/by-uuid/63960cf7-ce95-4e7d-8177-30bac148f890"; + boot.initrd.luks.devices."luks-eaf57b5b-66e6-419d-b23b-c8b2b6e2b08d".device = "/dev/disk/by-uuid/eaf57b5b-66e6-419d-b23b-c8b2b6e2b08d"; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/42C0-BA66"; + { device = "/dev/disk/by-uuid/5B54-234D"; fsType = "vfat"; };