From 763e2fd2017cde1ab92594e19c40268d664ced4a Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Sat, 13 Aug 2022 00:40:01 -0500 Subject: [PATCH] Streamline modules and profiles --- flake.nix | 1 - modules/automatic.nix | 12 +++++++++++ {profiles/base => modules/automatic}/nix.nix | 1 + .../base => modules/automatic}/programs.nix | 0 .../base => modules/automatic}/syncthing.nix | 0 .../automatic/users.nix | 21 ------------------- modules/default.nix | 1 + 7 files changed, 14 insertions(+), 22 deletions(-) create mode 100644 modules/automatic.nix rename {profiles/base => modules/automatic}/nix.nix (93%) rename {profiles/base => modules/automatic}/programs.nix (100%) rename {profiles/base => modules/automatic}/syncthing.nix (100%) rename profiles/base/default.nix => modules/automatic/users.nix (86%) mode change 100755 => 100644 diff --git a/flake.nix b/flake.nix index 0c49f14..600512c 100644 --- a/flake.nix +++ b/flake.nix @@ -23,7 +23,6 @@ { nixpkgs.overlays = [ nurpkgs.overlay local_overlay ]; } agenix.nixosModule ./modules - ./profiles/base ./hosts/${hostname} home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/modules/automatic.nix b/modules/automatic.nix new file mode 100644 index 0000000..b8f2f38 --- /dev/null +++ b/modules/automatic.nix @@ -0,0 +1,12 @@ +{ ... }: + +{ + imports = [ + ./automatic/nix.nix + ./automatic/programs.nix + ./automatic/syncthing.nix + ./automatic/users.nix + ]; + # I am a fan of network manager, myself + networking.networkmanager.enable = true; +} diff --git a/profiles/base/nix.nix b/modules/automatic/nix.nix similarity index 93% rename from profiles/base/nix.nix rename to modules/automatic/nix.nix index 3a964da..3d71a48 100644 --- a/profiles/base/nix.nix +++ b/modules/automatic/nix.nix @@ -20,4 +20,5 @@ keep-derivations = true autoOptimiseStore = true; }; nixpkgs.config.allowUnfree = true; + system.stateVersion = "22.05"; } diff --git a/profiles/base/programs.nix b/modules/automatic/programs.nix similarity index 100% rename from profiles/base/programs.nix rename to modules/automatic/programs.nix diff --git a/profiles/base/syncthing.nix b/modules/automatic/syncthing.nix similarity index 100% rename from profiles/base/syncthing.nix rename to modules/automatic/syncthing.nix diff --git a/profiles/base/default.nix b/modules/automatic/users.nix old mode 100755 new mode 100644 similarity index 86% rename from profiles/base/default.nix rename to modules/automatic/users.nix index 5e6b5b9..e9f47a6 --- a/profiles/base/default.nix +++ b/modules/automatic/users.nix @@ -1,16 +1,6 @@ { config, pkgs, agenix, ... }: { - imports = [ - ./nix.nix - ./programs.nix - ./syncthing.nix - ]; - - - # I am a fan of network manager, myself - networking.networkmanager.enable = true; - # Enable the OpenSSH daemon for remote control services.openssh.enable = true; #services.openssh.permitRootLogin = "yes"; @@ -27,21 +17,10 @@ ]; }; - users.users.test = { - isNormalUser = true; - createHome = true; - extraGroups = [ ]; - shell = pkgs.xonsh; - }; - i18n.defaultLocale = "en_US.UTF-8"; console = { font = "Lat2-Terminus16"; keyMap = "us"; }; - - # The set of default values, which allow syou to keep system defaults set - # to a predictable value as you upgrade the system - system.stateVersion = "21.11"; } diff --git a/modules/default.nix b/modules/default.nix index 2a2d0c4..f39ef20 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -2,6 +2,7 @@ { imports = [ + ./automatic.nix ./home.nix ./gnome.nix ./linode.nix