From 963e2de136fa8d5b6e3497a49940c0318d38253f Mon Sep 17 00:00:00 2001 From: fwastring Date: Fri, 24 Jan 2025 11:16:22 +0100 Subject: [PATCH] added work-desktop --- maskiner/work-desktop/configuration.nix | 8 ++ maskiner/work-desktop/configuration.nix.bak | 101 ++++++++++++++++++ .../work-desktop/hardware-configuration.nix | 12 ++- 3 files changed, 116 insertions(+), 5 deletions(-) create mode 100644 maskiner/work-desktop/configuration.nix.bak diff --git a/maskiner/work-desktop/configuration.nix b/maskiner/work-desktop/configuration.nix index c3e3f3c..01744cb 100644 --- a/maskiner/work-desktop/configuration.nix +++ b/maskiner/work-desktop/configuration.nix @@ -15,6 +15,14 @@ ../../config/users.nix ]; + environment.systemPackages = with pkgs; [ + kubectl + azure-cli + ]; + + + + networking.hostName = myhostname; services.xserver.dpi = 140; diff --git a/maskiner/work-desktop/configuration.nix.bak b/maskiner/work-desktop/configuration.nix.bak new file mode 100644 index 0000000..d757cfa --- /dev/null +++ b/maskiner/work-desktop/configuration.nix.bak @@ -0,0 +1,101 @@ +# 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, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "Europe/Stockholm"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "sv_SE.UTF-8"; + LC_IDENTIFICATION = "sv_SE.UTF-8"; + LC_MEASUREMENT = "sv_SE.UTF-8"; + LC_MONETARY = "sv_SE.UTF-8"; + LC_NAME = "sv_SE.UTF-8"; + LC_NUMERIC = "sv_SE.UTF-8"; + LC_PAPER = "sv_SE.UTF-8"; + LC_TELEPHONE = "sv_SE.UTF-8"; + LC_TIME = "sv_SE.UTF-8"; + }; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "se"; + variant = ""; + }; + + # Configure console keymap + console.keyMap = "sv-latin1"; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.fw = { + isNormalUser = true; + description = "Fredrik Wastring"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; []; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + wget + git +ssh + ]; + + # 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; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # 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 = "24.11"; # Did you read the comment? + +} diff --git a/maskiner/work-desktop/hardware-configuration.nix b/maskiner/work-desktop/hardware-configuration.nix index 260c281..3a39e3f 100644 --- a/maskiner/work-desktop/hardware-configuration.nix +++ b/maskiner/work-desktop/hardware-configuration.nix @@ -8,23 +8,25 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "nvme" "xhci_pci" "firewire_ohci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/54b2d5d8-d0cf-4aa2-a92a-7128abc98a85"; + { device = "/dev/disk/by-uuid/ab96fcd1-cab1-43e1-aae2-161bd088bb46"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/C1AA-0689"; + { device = "/dev/disk/by-uuid/3F89-6CDD"; fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; + options = [ "fmask=0077" "dmask=0077" ]; }; - swapDevices = [ ]; + swapDevices = + [ { device = "/dev/disk/by-uuid/5b889d43-0313-4fa2-ac22-5e303a3efb5b"; } + ]; # 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