diff options
| -rw-r--r-- | core/default.nix | 8 | ||||
| -rw-r--r-- | core/env.nix | 23 | ||||
| -rw-r--r-- | core/packages.nix | 10 | ||||
| -rw-r--r-- | hosts/c-pc/configuration.nix | 27 | ||||
| -rw-r--r-- | hosts/copenhagen/configuration.nix | 31 |
5 files changed, 43 insertions, 56 deletions
diff --git a/core/default.nix b/core/default.nix new file mode 100644 index 0000000..9ea2247 --- /dev/null +++ b/core/default.nix @@ -0,0 +1,8 @@ +{ ... }: + +{ + imports = [ + ./env.nix + ./packages.nix + ]; +} diff --git a/core/env.nix b/core/env.nix new file mode 100644 index 0000000..2fbf55e --- /dev/null +++ b/core/env.nix @@ -0,0 +1,23 @@ +{ pkgs, ... }: + +{ + environment = { + localBinInPath = true; + + #TODO: migrate to writeShellScriptBin + interactiveShellInit = '' + alias lsa="ls -lAsh" + alias c="codium ." + alias p="nix-shell -p" + + mkcd() { + mkdir -p "$1" + cd "$1" + } + ''; + + variables = { + EDITOR = "${pkgs.vim}/bin/vim"; + }; + }; +} diff --git a/core/packages.nix b/core/packages.nix new file mode 100644 index 0000000..bf30787 --- /dev/null +++ b/core/packages.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + git + vim + wget + killall + ]; +} diff --git a/hosts/c-pc/configuration.nix b/hosts/c-pc/configuration.nix index 73797ea..a0ce408 100644 --- a/hosts/c-pc/configuration.nix +++ b/hosts/c-pc/configuration.nix @@ -4,6 +4,7 @@ imports = [ ./hardware-configuration.nix ./networking.nix + ../../core ../../roles ]; @@ -32,27 +33,6 @@ }; }; - environment = { - localBinInPath = true; - - interactiveShellInit = '' - alias kitty-ssh="kitty +kitten ssh" - - alias lsa="ls -lAsh" - alias c="codium ." - alias p="nix-shell -p" - - mkcd() { - mkdir -p "$1" - cd "$1" - } - ''; - - variables = { - EDITOR = "${pkgs.vim}/bin/vim"; - }; - }; - time.timeZone = "America/Los_Angeles"; users.users = { @@ -96,9 +76,6 @@ (writeShellScriptBin "rbf" "sudo nixos-rebuild switch --flake path:/etc/nixos#default") (writeShellScriptBin "toys" "nix-shell -p cmatrix asciiquarium pipes cowsay figlet neofetch") - git - vim - wget firefox wineWowPackages.stable winetricks @@ -108,8 +85,6 @@ ffmpeg jellyfin - - killall go jdk21 diff --git a/hosts/copenhagen/configuration.nix b/hosts/copenhagen/configuration.nix index 21a2e98..d05d9a0 100644 --- a/hosts/copenhagen/configuration.nix +++ b/hosts/copenhagen/configuration.nix @@ -3,6 +3,7 @@ { imports = [ ./hardware-configuration.nix + ../../core ../../roles ]; @@ -11,32 +12,6 @@ networking.hostName = "copenhagen"; time.timeZone = "America/Los_Angeles"; - # home-manager = { - # extraSpecialArgs = { inherit inputs; }; - # users = { - # "c" = import ./home.nix; - # }; - # }; - - environment = { - localBinInPath = true; - - interactiveShellInit = '' - alias lsa="ls -lAsh" - alias c="codium ." - alias p="nix-shell -p" - - mkcd() { - mkdir -p "$1" - cd "$1" - } - ''; - - variables = { - EDITOR = "${pkgs.vim}/bin/vim"; - }; - }; - users.users = { root.password = "password"; @@ -51,10 +26,6 @@ (writeShellScriptBin "rb" "sudo nixos-rebuild switch --flake /etc/nixos#copenhagen") (writeShellScriptBin "rbf" "sudo nixos-rebuild switch --flake path:/etc/nixos#copenhagen") - git - vim - wget - killall ffmpeg ]; |