From d655642142bb86e3bd6d13d5cfef6eceb7cf47b3 Mon Sep 17 00:00:00 2001 From: Chris Thompson Date: Sun, 10 Nov 2024 20:02:55 -0500 Subject: [PATCH] ...to be honest, I'm not quite sure this makes ANY sense --- flake.nix | 3 +- .../{supercell => default}/configuration.nix | 38 +++++++++---------- .../hardware-configuration.nix | 0 hosts/{supercell => default}/home.nix | 0 hosts/default/main-user.nix | 34 +++++++++++++++++ main-user.nix | 24 ------------ 6 files changed, 53 insertions(+), 46 deletions(-) rename hosts/{supercell => default}/configuration.nix (88%) rename hosts/{supercell => default}/hardware-configuration.nix (100%) rename hosts/{supercell => default}/home.nix (100%) create mode 100644 hosts/default/main-user.nix delete mode 100644 main-user.nix diff --git a/flake.nix b/flake.nix index 1dcf775..9d6e815 100755 --- a/flake.nix +++ b/flake.nix @@ -14,7 +14,8 @@ nixosConfigurations.default = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;}; modules = [ - ./hosts/supercell/configuration.nix + ./hosts/default/configuration.nix + inputs.home-manager.nixosModules.default ]; }; }; diff --git a/hosts/supercell/configuration.nix b/hosts/default/configuration.nix similarity index 88% rename from hosts/supercell/configuration.nix rename to hosts/default/configuration.nix index 06f4315..b84bfc9 100644 --- a/hosts/supercell/configuration.nix +++ b/hosts/default/configuration.nix @@ -9,6 +9,7 @@ [ # Include the results of the hardware scan. ./hardware-configuration.nix inputs.home-manager.nixosModules.default + ./main-user.nix ]; # Add flakes nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -80,34 +81,29 @@ # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. + # Pull defaults from main-user: + main-user.enable = true; + main-user.userName = "wolcen"; + # And system-specific settings: users.users.wolcen = { - isNormalUser = true; description = "Chris Thompson"; - openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEdxdKYrlwOolJpYxvWu6gW/60pzT6aKN6JHhnTSBFqN wolcen@typhoon" ]; + openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEdxdKYrlwOolJpYxvWu6gW/60pzT6aKN6JHhnTSBFqN wolcen@typhoon" ]; extraGroups = [ "networkmanager" "wheel" ]; - packages = with pkgs; [ - kdePackages.kate - thunderbird - keepassxc - neofetch - z-lua - logseq # REQUIRES TEMPORARY INSECURE ELECTRON - signal-desktop - ]; }; - home-manager = { - extraSpecialArgs = { inherit inputs; }; - users = { - "wolcen" = import ./home.nix; - }; - }; + home-manager = { + extraSpecialArgs = { inherit inputs; }; + users = { + "wolcen" = import ./home.nix; + }; + }; - # Install firefox. + # Install firefox. programs.firefox.enable = true; - + # Add docker! + virtualisation.docker.enable = true; + virtualisation.docker.storageDriver = "btrfs"; # Only when using BTRFS! (wolcen approved!) # Allow unfree packages nixpkgs.config.allowUnfree = true; @@ -139,7 +135,7 @@ # Enable the OpenSSH daemon. services.openssh.enable = true; - # RX 6700 XT setup + # RX 6700 XT setup hardware.graphics.extraPackages = [ pkgs.rocmPackages.clr.icd pkgs.amdvlk diff --git a/hosts/supercell/hardware-configuration.nix b/hosts/default/hardware-configuration.nix similarity index 100% rename from hosts/supercell/hardware-configuration.nix rename to hosts/default/hardware-configuration.nix diff --git a/hosts/supercell/home.nix b/hosts/default/home.nix similarity index 100% rename from hosts/supercell/home.nix rename to hosts/default/home.nix diff --git a/hosts/default/main-user.nix b/hosts/default/main-user.nix new file mode 100644 index 0000000..c007c0a --- /dev/null +++ b/hosts/default/main-user.nix @@ -0,0 +1,34 @@ +{ lib, config, pkgs, ... }: + +let + cfg = config.main-user; +in +{ + options.main-user = { + enable = lib.mkEnableOption "enable main-user module"; + userName = lib.mkOption { + default = "submin"; + description = '' + username + ''; + }; + }; + + config = lib.mkIf cfg.enable { + users.users.${cfg.userName} = { + isNormalUser = true; + initialPassword = "B@dC0d3MangFIX|T"; + description = "Just a normal admin"; + extraGroups = [ "wheel" "networkmanager" "docker" ]; + packages = with pkgs; [ + kdePackages.kate + thunderbird + keepassxc + macchina + z-lua + logseq # REQUIRES TEMPORARY INSECURE ELECTRON + signal-desktop + ]; + }; + }; +} diff --git a/main-user.nix b/main-user.nix deleted file mode 100644 index aa065f5..0000000 --- a/main-user.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, config, pkgs, ... }: - -let - cfg = config.main-user; -in -{ - options.main-user = { - enable = lib.mkEnableOption "enable main-user module"; - userName = lib.mkOption { - default = "submin"; - description = '' - username - ''; - } - } - - config = lib.mkIf cfg.enable { - users.users.${cfg.userName} = { - isNormalUser = true; - initialPassword = "B@dC0d3MangFIX|T"; - description = "Just a normal admin"; - }; - }; -};