From 3705f8b8fe70e92af12988bee9e0b8c2089264b5 Mon Sep 17 00:00:00 2001 From: xeovalyte Date: Thu, 9 Jan 2025 15:59:10 +0100 Subject: [PATCH] Added christa desktop --- flake.nix | 25 ++++++++++ hosts/ch-clt-dsk01/default.nix | 86 ++++++++++++++++++++++++++++++++++ hosts/ch-clt-dsk01/home.nix | 73 +++++++++++++++++++++++++++++ hosts/desktop/default.nix | 2 +- hosts/desktop/home.nix | 5 +- 5 files changed, 189 insertions(+), 2 deletions(-) create mode 100644 hosts/ch-clt-dsk01/default.nix create mode 100644 hosts/ch-clt-dsk01/home.nix diff --git a/flake.nix b/flake.nix index 146c1d3..693fec5 100644 --- a/flake.nix +++ b/flake.nix @@ -62,6 +62,31 @@ }; }; + # Christa Desktop Configuration + nixosConfigurations = { + ch-clt-dsk01 = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) + + ./hosts/ch-clt-dsk01 + ]; + }; + }; + + homeConfigurations = { + "kiiwy@ch-clt-dsk01" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.x86_64-linux; + extraSpecialArgs = { inherit inputs nix-colors; }; + modules = [ + ({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; }) + + ./hosts/ch-clt-dsk01/home.nix + ]; + }; + }; + # Surface Configuration nixosConfigurations = { xv-surface = nixpkgs.lib.nixosSystem { diff --git a/hosts/ch-clt-dsk01/default.nix b/hosts/ch-clt-dsk01/default.nix new file mode 100644 index 0000000..30736f4 --- /dev/null +++ b/hosts/ch-clt-dsk01/default.nix @@ -0,0 +1,86 @@ +{ pkgs, ... }: + +{ + imports = [ + # Import hardware configuration + ./hardware-configuration.nix + + # Import modules + ../../modules/system/default.nix + ]; + + settings = { + display-manager = "gdm"; + desktop-environments = { + cosmic.enable = false; + hyprland.enable = false; + gnome.enable = true; + }; + applications = { + common.enable = true; + steam.enable = true; + thunar.enable = false; + }; + services = { + docker.enable = false; + quickemu.enable = false; + sunshine.enable = false; + garbage-collection.enable = true; + }; + hardware = { + fprint.enable = false; + printing.enable = true; + bluetooth.enable = false; + firewall.enable = true; + locale.enable = true; + nvidia.enable = true; + }; + }; + + nix.settings = { + experimental-features = [ "nix-command" "flakes" ]; + + substituters = [ + "https://nix-community.cachix.org" + "https://cosmic.cachix.org/" + ]; + + trusted-public-keys = [ + "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" + ]; + }; + + # Bootloader. + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.grub = { + enable = true; + efiSupport = true; + device = "nodev"; + configurationLimit = 32; + }; + + networking.hostName = "ch-clt-dsk01"; # Define your hostname. + + networking.firewall = { + enable = true; + allowedTCPPorts = [ 80 443 53 ]; + allowedUDPPorts = [ 80 443 53 ]; + }; + + users.users.kiiwy = { + isNormalUser = true; + description = "Christa Boomers"; + extraGroups = [ "networkmanager" "wheel" "dialout" ]; + }; + + nix.settings.trusted-users = [ "root" "kiiwy" ]; + + # Prevent system freeze on high load + services.earlyoom = { + enable = true; + }; + + boot.kernelPackages = pkgs.linuxPackages_latest; + + system.stateVersion = "24.05"; +} diff --git a/hosts/ch-clt-dsk01/home.nix b/hosts/ch-clt-dsk01/home.nix new file mode 100644 index 0000000..fd9b10e --- /dev/null +++ b/hosts/ch-clt-dsk01/home.nix @@ -0,0 +1,73 @@ +{ pkgs, lib, ... }: + +{ + imports = [ + # Modules + ../../modules/home/default.nix + ]; + + options = { + host = lib.mkOption { + type = with lib.types; str; + description = '' + Define the host of the machine + ''; + }; + + headless = lib.mkOption { + type = with lib.types; bool; + description = '' + Is this machine headless? + ''; + }; + }; + + config = { + home = { + username = "kiiwy"; + homeDirectory = "/home/kiiwy"; + }; + + host = "ch-clt-dsk01"; + headless = false; + + settings = { + applications.common.enable = true; + applications.alacritty.enable = false; + applications.devenv.enable = false; + applications.firefox.enable = true; + applications.git.enable = true; + applications.helix.enable = true; + applications.zsh.enable = true; + applications.ssh.enable = true; + applications.thunderbird.enable = false; + applications.yazi.enable = false; + applications.zellij.enable = false; + + services.nextcloud-sync.enable = false; + + theming.fonts.enable = true; + theming.nix-colors.enable = false; + theming.stylix.enable = true; + + desktop-environments.hyprland.enable = false; + }; + + home.packages = with pkgs; [ + # Desktop Applications + prismlauncher + signal-desktop + unstable.vesktop + blender + + # Office + libreoffice + ]; + + # Enable home-manager + programs.home-manager.enable = true; + + home.stateVersion = "24.05"; + }; + +} diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 5d748c1..0ea0e6c 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -69,7 +69,7 @@ }; networking.hosts = { - "192.168.100.118" = [ "timo.bmrs.nl" "adguard.timo.bmrs.nl" "git.timo.bmrs.nl" "auth.timo.bmrs.nl" "ldap.timo.bmrs.nl" "dozzle.timo.bmrs.nl" "home.timo.bmrs.nl" "immich.timo.bmrs.nl" "paperless.timo.bmrs.nl" "search.timo.bmrs.nl" ]; + "192.168.100.118" = [ "timo.bmrs.nl" "www.timo.bmrs.nl" "homeassistant.timo.bmrs.nl" "adguard.timo.bmrs.nl" "git.timo.bmrs.nl" "auth.timo.bmrs.nl" "ldap.timo.bmrs.nl" "dozzle.timo.bmrs.nl" "home.timo.bmrs.nl" "immich.timo.bmrs.nl" "paperless.timo.bmrs.nl" "search.timo.bmrs.nl" ]; }; services.openssh.enable = true; diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index f77be89..46a1d86 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -34,7 +34,10 @@ home.packages = with pkgs; [ unstable.prismlauncher unstable.vesktop - unstable.baobab + unstable.rnote + + # Office + libreoffice ]; # Enable home-manager