From feec2223aac6b8f3b43722ba50ac3ae39595505a Mon Sep 17 00:00:00 2001 From: Daniel Meiburg Date: Thu, 28 Sep 2023 22:12:07 +0200 Subject: [PATCH] Prepare multihost setup --- flake.nix | 18 ++++++++++-- home.nix | 20 +++++++++++++ hosts/firefly/configuration.nix | 28 +++++++++++++++++++ .../firefly/hardware-configuration.nix | 0 configuration.nix => hosts/workstation.nix | 24 +--------------- 5 files changed, 65 insertions(+), 25 deletions(-) create mode 100644 hosts/firefly/configuration.nix rename hardware-configuration.nix => hosts/firefly/hardware-configuration.nix (100%) rename configuration.nix => hosts/workstation.nix (68%) diff --git a/flake.nix b/flake.nix index 6a42b11..b08a895 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "A very basic flake"; + description = "System config"; inputs = { nixpkgs.url = github:nixos/nixpkgs/nixos-unstable; @@ -22,7 +22,21 @@ firefly = lib.nixosSystem { inherit system; modules = [ - ./configuration.nix + ./hosts/firefly/configuration.nix + home-manager.nixosModules.home-manager { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.dm = { + imports = [ ./home.nix ]; + }; + } + ]; + }; + + p14s = lib.nixosSystem { + inherit system; + modules = [ + ./hosts/p14s/configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; diff --git a/home.nix b/home.nix index 77aabdd..04c453e 100644 --- a/home.nix +++ b/home.nix @@ -20,6 +20,9 @@ nodejs pinentry-qt kanshi + mpv + ffmpeg + xdg-utils # All of the below is for sway wl-clipboard bemenu @@ -71,4 +74,21 @@ defaultCursor = "Adwaita"; }; }; + gtk = { + enable = true; + theme = { + package = pkgs.nordic; + name = "Nordic"; + }; + }; + xdg = { + mime.enable = true; + mimeApps = { + enable = true; + defaultApplications = { + "text/plain" = "nvim.desktop"; + "video/x-matroska" = "mpv.desktop"; + }; + }; + }; } diff --git a/hosts/firefly/configuration.nix b/hosts/firefly/configuration.nix new file mode 100644 index 0000000..e102619 --- /dev/null +++ b/hosts/firefly/configuration.nix @@ -0,0 +1,28 @@ +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ../workstation.nix + ]; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.efi.efiSysMountPoint = "/boot/efi"; + + boot.initrd.secrets = { + "/crypto_keyfile.bin" = null; + }; + + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "22.11"; # Did you read the comment? + +} diff --git a/hardware-configuration.nix b/hosts/firefly/hardware-configuration.nix similarity index 100% rename from hardware-configuration.nix rename to hosts/firefly/hardware-configuration.nix diff --git a/configuration.nix b/hosts/workstation.nix similarity index 68% rename from configuration.nix rename to hosts/workstation.nix index 4507105..67dad6b 100644 --- a/configuration.nix +++ b/hosts/workstation.nix @@ -1,20 +1,6 @@ { config, pkgs, ... }: { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.efi.efiSysMountPoint = "/boot/efi"; - - boot.initrd.secrets = { - "/crypto_keyfile.bin" = null; - }; - hardware.opengl.enable = true; networking.hostName = "firefly"; # Define your hostname. @@ -96,13 +82,5 @@ }; programs.fish.enable = true; services.getty.autologinUser = "dm"; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = "22.11"; # Did you read the comment? - + programs.dconf.enable = true; }