diff --git a/hosts/default.nix b/hosts/default.nix index a2e48b5..9915003 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -13,4 +13,15 @@ in { inputs.agenix.nixosModules.default ]; }; + + dyonisos = lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit lib inputs self; }; + modules = [ + ./dyonisos + ../modules + inputs.home-manager.nixosModules.home-manager + inputs.agenix.nixosModules.default + ]; + }; } diff --git a/hosts/dyonisos/configuration.nix b/hosts/dyonisos/configuration.nix new file mode 100644 index 0000000..5b766ea --- /dev/null +++ b/hosts/dyonisos/configuration.nix @@ -0,0 +1,78 @@ +{ config, inputs, pkgs, ... }: +{ + nixpkgs.config.allowUnfree = true; + time.timeZone = "Europe/Zurich"; + security.sudo.package = pkgs.sudo.override { withInsults = true; }; + security.polkit.enable = true; + programs.kdeconnect.enable = true; + myOptions = { + other = { + system = { + hostname = "dyonisos"; + username = "lars"; + }; + home-manager = { + enable = true; + enableDirenv = true; + }; + }; + + programs = { + vesktop.enable = true; + btop.enable = true; + mpv.enable = true; + schizofox.enable = true; + + zsh = { + enable = true; + profiling = false; + extraAliases = { + cls = "clear"; + cd = "z"; + }; + }; + + git = { + enable = true; + userName = "LarsZauberer"; + userEmail = "wasser.ian@gmail.com"; + defaultBranch = "main"; + }; + }; + + services = { + pipewire.enable = true; + }; + + themes = { + cursor = { + enable = false; + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 24; + }; + gtk = { + enable = false; + package = pkgs.catppuccin-gtk; + name = "Catppuccin-Mocha-Standard-Green-Dark"; + variant = "mocha"; + accentColour = "green"; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders; + }; + }; + qt = { + enable = false; + package = pkgs.catppuccin-kde; + name = "Catppuccin-Mocha-Dark"; + variant = "mocha"; + accentColour = "green"; + }; + }; + }; + + console.keyMap = "sg"; + + system.stateVersion = "23.11"; +} diff --git a/hosts/dyonisos/default.nix b/hosts/dyonisos/default.nix new file mode 100644 index 0000000..fc2f103 --- /dev/null +++ b/hosts/dyonisos/default.nix @@ -0,0 +1,8 @@ +_: { + imports = [ + ./configuration.nix + ./programs.nix + ./hardware-configuration.nix + ./profile.nix + ]; +} diff --git a/hosts/dyonisos/hardware-configuration.nix b/hosts/dyonisos/hardware-configuration.nix new file mode 100644 index 0000000..8a45163 --- /dev/null +++ b/hosts/dyonisos/hardware-configuration.nix @@ -0,0 +1,38 @@ +# 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 + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/bca69c91-6f66-4b21-b90e-15b4bc21a405"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/8683-FD07"; + fsType = "vfat"; + }; + + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp1s0f0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/dyonisos/profile.nix b/hosts/dyonisos/profile.nix new file mode 100644 index 0000000..eb75946 --- /dev/null +++ b/hosts/dyonisos/profile.nix @@ -0,0 +1,9 @@ +_: { + imports = [ + ../../options/boot/grub-boot.nix + ../../options/desktop/fonts.nix + ../../options/common/networking.nix + ../../options/common/pin-registry.nix + ../../options/common/preserve-system.nix + ]; +} diff --git a/hosts/dyonisos/programs.nix b/hosts/dyonisos/programs.nix new file mode 100644 index 0000000..b487c30 --- /dev/null +++ b/hosts/dyonisos/programs.nix @@ -0,0 +1,50 @@ +{ config, inputs, pkgs, ... }: +let + username = config.myOptions.other.system.username; +in { + home-manager.users.${username} = { + home.packages = let + fenix = inputs.fenix.packages.${pkgs.system}; + + in with pkgs; [ + neofetch + git + trash-cli + element-desktop + steam + libreoffice-fresh + ventoy-full + lazygit + # obsidian + neofetch + zip + vlc + zathura + alacritty + unzip + gcc + bibata-cursors + networkmanagerapplet + xclip + pamixer + pcmanfm + ffmpeg_6-full + (fenix.complete.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + ]) + polkit + fastfetch + alsa-utils + gdb + tree + smartmontools + python3 + rustdesk + neovim + ]; + }; +} diff --git a/modules/cli/git.nix b/modules/cli/git.nix index bc8ce28..0ce5a4c 100644 --- a/modules/cli/git.nix +++ b/modules/cli/git.nix @@ -46,9 +46,9 @@ in { push.autoSetupRemote = true; commit = { verbose = true; - gpgsign = true; + # gpgsign = true; }; - gpg.format = "ssh"; + # gpg.format = "ssh"; # user.signingkey = "key::${cfg.signingKey}"; merge.conflictstyle = "zdiff3"; interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only"; diff --git a/modules/cli/zsh.nix b/modules/cli/zsh.nix index 401b44e..a1cb6ad 100644 --- a/modules/cli/zsh.nix +++ b/modules/cli/zsh.nix @@ -41,7 +41,7 @@ in { cd = "z"; nv = "nvim"; #TODO fix hardcoding of git repo path and profile name - update = "sudo -p 'password: ' echo 'Your daughter is just a fork of your wife.' && sudo nixos-rebuild switch --flake \"$HOME/Git/nichts#${username}\" --log-format internal-json |& nom --json"; + update = "sudo -p 'password: ' echo 'Your daughter is just a fork of your wife.' && sudo nixos-rebuild switch --flake \"$HOME/nichts#${config.myOptions.other.system.hostname}\" --log-format internal-json |& nom --json"; } // cfg.extraAliases; initExtraFirst = mkIf cfg.profiling "zmodload zsh/zprof";