diff --git a/flake.nix b/flake.nix index 55e9b3e..57c30f0 100644 --- a/flake.nix +++ b/flake.nix @@ -75,18 +75,20 @@ home-manager-unstable.nixosModules.home-manager ]; }; - nixosConfigurations."nix-laptop" = nixpkgs.lib.nixosSystem { + nixosConfigurations."nix-laptop" = nixpkgs-unstable.lib.nixosSystem { inherit system; specialArgs = { ## Custom variables (e.g. ip, interface, etc) vars = import ./systems/userdata-default.nix // import ./systems/laptop/userdata.nix; - pkgsVersion = nixpkgs; + pkgsVersion = nixpkgs-unstable; inherit inputs outputs; inherit nix-colors; }; modules = [ ### User specific ### ./users/kopatz + ./systems/laptop/configuration.nix + ./modules/collections/laptop.nix ./modules ./modules/ecryptfs.nix ./modules/services/syncthing.nix @@ -94,7 +96,6 @@ ./modules/support/ntfs.nix ./modules/thunderbolt.nix ./modules/vmware-host.nix - ./systems/laptop/configuration.nix #./modules/fh/forensik.nix #./modules/no-sleep-lid-closed.nix #./modules/static-ip.nix @@ -102,7 +103,7 @@ ({ config, outputs, ... }: { nixpkgs.overlays = with outputs.overlays; [additions modifications unstable-packages nur.overlay]; }) nixos-hardware.nixosModules.dell-xps-15-7590-nvidia agenix.nixosModules.default - home-manager.nixosModules.home-manager + home-manager-unstable.nixosModules.home-manager ]; }; # build vm -> nixos-rebuild build-vm --flake .#vm diff --git a/modules/collections/laptop.nix b/modules/collections/laptop.nix index bc16360..d7ca06f 100644 --- a/modules/collections/laptop.nix +++ b/modules/collections/laptop.nix @@ -2,6 +2,8 @@ { imports = [ ../graphical/hyprland.nix # TODO + ../kernel.nix # use latest kernel + ../docker.nix ]; custom = { cli-tools.enable = true; @@ -21,6 +23,7 @@ code.enable = true; emulators.enable = true; gamemode.enable = true; + gnome.enable = true; hyprland.enable = true; games.enable = true; ime.enable = true; diff --git a/modules/graphical/gnome.nix b/modules/graphical/gnome.nix index 7c2e3e7..f6cdb49 100644 --- a/modules/graphical/gnome.nix +++ b/modules/graphical/gnome.nix @@ -1,4 +1,4 @@ -{lib, config, pkgs, mainUser, ... }: +{lib, config, pkgs, ... }: with lib; let cfg = config.custom.graphical.gnome; @@ -10,8 +10,8 @@ in config = mkIf cfg.enable { services.xserver = { - layout = mainUser.layout; - xkbVariant = mainUser.variant; + xkb.layout = config.mainUser.layout; + xkb.variant = config.mainUser.variant; enable = true; displayManager.gdm.enable = true; desktopManager.gnome.enable = true; @@ -27,11 +27,11 @@ in environment.gnome.excludePackages = (with pkgs; [ gnome-photos gnome-tour + gedit # text editor ]) ++ (with pkgs.gnome; [ cheese # webcam tool gnome-music gnome-terminal - gedit # text editor epiphany # web browser #geary # email reader evince # document viewer @@ -54,7 +54,7 @@ in colloid-icon-theme gnomeExtensions.appindicator gnomeExtensions.just-perfection - gnomeExtensions.system-monitor + gnomeExtensions.system-monitor-2 gnomeExtensions.dash2dock-lite gnomeExtensions.dash-to-dock gnomeExtensions.vitals diff --git a/modules/graphical/hyprland.nix b/modules/graphical/hyprland.nix index b4ab998..6802ed7 100644 --- a/modules/graphical/hyprland.nix +++ b/modules/graphical/hyprland.nix @@ -15,8 +15,8 @@ in patchedWaybar = pkgs.unstable.waybar.overrideAttrs (oldAttrs: { mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; }); in mkIf cfg.enable { services.xserver = { - layout = config.mainUser.layout; - xkbVariant = config.mainUser.variant; + xkb.layout = config.mainUser.layout; + xkb.variant = config.mainUser.variant; enable = true; displayManager = mkIf (!config.services.xserver.displayManager.gdm.enable) { sddm.enable = true; diff --git a/systems/laptop/configuration.nix b/systems/laptop/configuration.nix index 0843dce..b512b96 100644 --- a/systems/laptop/configuration.nix +++ b/systems/laptop/configuration.nix @@ -1,17 +1,77 @@ -{ config, pkgs, lib, ... }: - +{ config, pkgs, inputs, ... }: { - imports = - [ - ./main.nix - ./gnome.nix + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ./modules/battery.nix + #./modules/wireguard.nix + ## -- set in flake.nix + # + # + ]; + + mainUser.layout = "at"; + mainUser.variant = ""; + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "nix-laptop"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Enable networking + networking.networkmanager.enable = true; + boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; + + networking.extraHosts = + '' + 82.218.12.28 kopatz.ddns.net + ''; + + # Set your time zone. + time.timeZone = "Europe/Vienna"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "de_AT.UTF-8"; + LC_IDENTIFICATION = "de_AT.UTF-8"; + LC_MEASUREMENT = "de_AT.UTF-8"; + LC_MONETARY = "de_AT.UTF-8"; + LC_NAME = "de_AT.UTF-8"; + LC_NUMERIC = "de_AT.UTF-8"; + LC_PAPER = "de_AT.UTF-8"; + LC_TELEPHONE = "de_AT.UTF-8"; + LC_TIME = "de_AT.UTF-8"; + }; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable touchpad support (enabled default in most desktopManager). + services.xserver.libinput.enable = true; + + ### docker + virtualisation.docker.enable = true; + + systemd.tmpfiles.rules = [ + "d /docker-data 0755 kopatz users" ]; - services.xserver = { - layout = lib.mkForce "at"; - xkbVariant = lib.mkForce ""; - enable = true; - displayManager.gdm.enable = true; - }; + security.pki.certificates = [ '' +-----BEGIN CERTIFICATE----- +MIIBjTCCATKgAwIBAgIRAMVH2+JHZ3wm2fLUlKjTYDswCgYIKoZIzj0EAwIwJDEM +MAoGA1UEChMDS29wMRQwEgYDVQQDEwtLb3AgUm9vdCBDQTAeFw0yMzEyMDgxNDUx +MTZaFw0zMzEyMDUxNDUxMTZaMCQxDDAKBgNVBAoTA0tvcDEUMBIGA1UEAxMLS29w +IFJvb3QgQ0EwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATdZBOkNynShXipzhuX +f6dUByD3chNupNWsagYC5AlPRJT9fAeHEIK/bxWkFwRtLBDopWvBu9lHahBgpHc7 +y7rTo0UwQzAOBgNVHQ8BAf8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBATAdBgNV +HQ4EFgQU9AVtwipW5HDBLfZRH1KZCnIKCfowCgYIKoZIzj0EAwIDSQAwRgIhAMHj +AipNdhQKIYPvMt/h1uW4xP3NTkitnmshM09+rIasAiEAlSalGddXDkqJBHhPD+Fr +gpuVkfVkA8gQCXNs5F9TnxA= +-----END CERTIFICATE----- + '']; + + system.stateVersion = "23.05"; # Did you read the comment? } diff --git a/systems/laptop/gnome.nix b/systems/laptop/gnome.nix deleted file mode 100644 index d2feeb1..0000000 --- a/systems/laptop/gnome.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ config, pkgs, ... }: - -{ - services.xserver = { - layout = "at"; - xkbVariant = ""; - enable = true; - desktopManager.gnome.enable = true; - }; - - environment.gnome.excludePackages = (with pkgs; [ - gnome-photos - gnome-tour - ]) ++ (with pkgs.gnome; [ - cheese # webcam tool - gnome-music - gnome-terminal - gedit # text editor - epiphany # web browser - #geary # email reader - evince # document viewer - gnome-characters - totem # video player - tali # poker game - iagno # go game - hitori # sudoku game - atomix # puzzle game - ]); - - environment.systemPackages = with pkgs; [ - wmctrl - gnome.mutter - gnome.adwaita-icon-theme - gnome.gnome-settings-daemon - gnome.gnome-tweaks - gnome.dconf-editor - gruvbox-gtk-theme - colloid-icon-theme - gnomeExtensions.appindicator - gnomeExtensions.just-perfection - gnomeExtensions.system-monitor - gnomeExtensions.dash2dock-lite - gnomeExtensions.dash-to-dock - gnomeExtensions.vitals - gnomeExtensions.rounded-window-corners - gnomeExtensions.wallpaper-switcher - gnomeExtensions.backslide - gnomeExtensions.nextcloud-folder - gnomeExtensions.tray-icons-reloaded - gnomeExtensions.blur-my-shell - ]; -} diff --git a/systems/laptop/main.nix b/systems/laptop/main.nix deleted file mode 100644 index c9b3ce2..0000000 --- a/systems/laptop/main.nix +++ /dev/null @@ -1,118 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page -# and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, inputs, ... }: -{ - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ./modules/battery.nix - #./modules/wireguard.nix - ## -- set in flake.nix - # - # - ]; - - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - networking.hostName = "nix-laptop"; # Define your hostname. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Enable networking - networking.networkmanager.enable = true; - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; - - networking.extraHosts = - '' - 82.218.12.28 kopatz.ddns.net - ''; - - # Set your time zone. - time.timeZone = "Europe/Vienna"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - i18n.extraLocaleSettings = { - LC_ADDRESS = "de_AT.UTF-8"; - LC_IDENTIFICATION = "de_AT.UTF-8"; - LC_MEASUREMENT = "de_AT.UTF-8"; - LC_MONETARY = "de_AT.UTF-8"; - LC_NAME = "de_AT.UTF-8"; - LC_NUMERIC = "de_AT.UTF-8"; - LC_PAPER = "de_AT.UTF-8"; - LC_TELEPHONE = "de_AT.UTF-8"; - LC_TIME = "de_AT.UTF-8"; - }; - - # Enable CUPS to print documents. - services.printing.enable = true; - - # Enable touchpad support (enabled default in most desktopManager). - services.xserver.libinput.enable = true; - - ### docker - virtualisation.docker.enable = true; - - ## podman - #virtualisation = { - # podman = { - # enable = false; - - # Create a `docker` alias for podman, to use it as a drop-in replacement - #dockerCompat = true; - - # Required for containers under podman-compose to be able to talk to each other. - # defaultNetwork.settings.dns_enabled = true; - # For Nixos version > 22.11 - #defaultNetwork.settings = { - # dns_enabled = true; - #}; - # }; - #}; - - systemd.tmpfiles.rules = [ - "d /docker-data 0755 kopatz users" - ]; - - ### end docker - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - - security.pki.certificates = [ '' ------BEGIN CERTIFICATE----- -MIIBjTCCATKgAwIBAgIRAMVH2+JHZ3wm2fLUlKjTYDswCgYIKoZIzj0EAwIwJDEM -MAoGA1UEChMDS29wMRQwEgYDVQQDEwtLb3AgUm9vdCBDQTAeFw0yMzEyMDgxNDUx -MTZaFw0zMzEyMDUxNDUxMTZaMCQxDDAKBgNVBAoTA0tvcDEUMBIGA1UEAxMLS29w -IFJvb3QgQ0EwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATdZBOkNynShXipzhuX -f6dUByD3chNupNWsagYC5AlPRJT9fAeHEIK/bxWkFwRtLBDopWvBu9lHahBgpHc7 -y7rTo0UwQzAOBgNVHQ8BAf8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBATAdBgNV -HQ4EFgQU9AVtwipW5HDBLfZRH1KZCnIKCfowCgYIKoZIzj0EAwIDSQAwRgIhAMHj -AipNdhQKIYPvMt/h1uW4xP3NTkitnmshM09+rIasAiEAlSalGddXDkqJBHhPD+Fr -gpuVkfVkA8gQCXNs5F9TnxA= ------END CERTIFICATE----- - '']; - - # 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 = "23.05"; # Did you read the comment? - -} diff --git a/systems/laptop/plasma.nix b/systems/laptop/plasma.nix deleted file mode 100644 index 21266eb..0000000 --- a/systems/laptop/plasma.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, pkgs, ... }: - -{ - - imports = - [ - ./main.nix - ]; - - services.xserver = { - layout = "at"; - xkbVariant = ""; - enable = true; - displayManager.sddm.enable = true; - desktopManager.plasma5.enable = true; - }; -}