diff options
Diffstat (limited to 'machines/oxo')
| -rw-r--r-- | machines/oxo/configuration.nix | 33 | ||||
| -rw-r--r-- | machines/oxo/git-home.nix | 19 | ||||
| -rw-r--r-- | machines/oxo/hardware-configuration.nix | 56 | ||||
| -rw-r--r-- | machines/oxo/home.nix | 37 |
4 files changed, 145 insertions, 0 deletions
diff --git a/machines/oxo/configuration.nix b/machines/oxo/configuration.nix new file mode 100644 index 0000000..ef7a84b --- /dev/null +++ b/machines/oxo/configuration.nix @@ -0,0 +1,33 @@ +{ lib, inputs, pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + inputs.home-manager.nixosModules.default + ] ++ (map (path: ../../modules/${path}) [ + "core/global.nix" + "ssh.nix" + "compromyse.nix" + "git/user.nix" + "git/cgit.nix" + ]); + + networking.hostName = "oxo"; + + boot.loader.grub = { + enable = true; + forceInstall = true; + device = "/dev/sda"; + }; + + programs.fuse.userAllowOther = true; + home-manager = { + extraSpecialArgs = { inherit inputs; }; + useGlobalPkgs = true; + useUserPackages = true; + users = { + git = import ./git-home.nix; + compromyse = import ./home.nix + }; + }; +} diff --git a/machines/oxo/git-home.nix b/machines/oxo/git-home.nix new file mode 100644 index 0000000..ce20f9e --- /dev/null +++ b/machines/oxo/git-home.nix @@ -0,0 +1,19 @@ +{ inputs, pkgs, ... }: + +{ + home = { + username = "git"; + homeDirectory = "/home/git"; + }; + + home.packages = with pkgs; [ + git-lfs + ]; + + imports = (map (path: ../../config/${path}) [ + "git" + "nvim" + ]); + + home.stateVersion = "23.11"; +} diff --git a/machines/oxo/hardware-configuration.nix b/machines/oxo/hardware-configuration.nix new file mode 100644 index 0000000..b10d174 --- /dev/null +++ b/machines/oxo/hardware-configuration.nix @@ -0,0 +1,56 @@ +# 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, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f321b489-3003-4d4a-8e86-0eee0584e0f6"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/f321b489-3003-4d4a-8e86-0eee0584e0f6"; + fsType = "btrfs"; + options = [ "subvol=boot" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/f321b489-3003-4d4a-8e86-0eee0584e0f6"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/f321b489-3003-4d4a-8e86-0eee0584e0f6"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; + + fileSystems."/config" = + { device = "/dev/disk/by-uuid/f321b489-3003-4d4a-8e86-0eee0584e0f6"; + fsType = "btrfs"; + options = [ "subvol=config" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/machines/oxo/home.nix b/machines/oxo/home.nix new file mode 100644 index 0000000..8672e15 --- /dev/null +++ b/machines/oxo/home.nix @@ -0,0 +1,37 @@ +{ inputs, pkgs, ... }: + +{ + home = { + username = "compromyse"; + homeDirectory = "/home/compromyse"; + }; + + home.packages = with pkgs; [ + tmux + fzf + fd + ripgrep + + unzip + zip + ]; + + programs = { + direnv = { + enable = true; + enableBashIntegration = true; + nix-direnv.enable = true; + }; + + bash.enable = true; + }; + + imports = (map (path: ../../config/${path}) [ + "bash.nix" + "dotfiles.nix" + "git" + "nvim" + ]); + + home.stateVersion = "23.11"; +} |
