my nixos configuration
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

actions.nix for workflow, bunch of fixes

Thunder 7bc0b92c e6aa8253

+82 -258
+1 -1
.envrc
··· 1 - use nix 1 + use flake
+41 -41
.github/workflows/update-flake.yaml
··· 1 - name: Update flake.lock 2 - on: 3 - schedule: 4 - - cron: "0 03 */2 * *" 5 - workflow_dispatch: 6 - 7 1 jobs: 8 2 update: 9 3 runs-on: ubuntu-latest 10 - env: 11 - HOSTS: t440p uwu 12 - permissions: 13 - contents: write 14 4 steps: 15 - - name: Free Disk Space (Ubuntu) 16 - uses: jlumbroso/free-disk-space@main 17 - with: 18 - tool-cache: true 19 - - uses: actions/checkout@v4 20 - with: 21 - fetch-depth: 0 22 - - name: Lix Installer 23 - run: curl --proto '=https' --tlsv1.2 -sSf -L https://install.lix.systems/lix | sh -s -- install --no-confirm --extra-conf "trusted-users = root runner" 24 - - uses: cachix/cachix-action@v16 25 - with: 26 - name: meowos 27 - authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" 28 - - name: Update flake inputs 29 - run: nix flake update --accept-flake-config 30 - - name: Build hosts 31 - run: | 32 - for host in $HOSTS; do 33 - nix build --accept-flake-config .#nixosConfigurations.$host.config.system.build.toplevel 34 - done 35 - 36 - - name: Commit 37 - uses: stefanzweifel/git-auto-commit-action@v5 38 - with: 39 - commit_message: "chore(deps): bump flake.lock" 40 - commit_user_name: Flake Bot Update 41 - commit_author: Flake Bot Update <actions@github.com> 42 - branch: main 43 - file_pattern: flake.lock 44 - skip_dirty_check: false 45 - skip_fetch: true 5 + - uses: actions/checkout@v5 6 + - uses: wimpysworld/nothing-but-nix@v6 7 + with: 8 + hatchet-protocol: rampage 9 + - name: Lix Installer 10 + run: curl --proto '=https' --tlsv1.2 -sSf -L https://install.lix.systems/lix 11 + | sh -s -- install --no-confirm --extra-conf 'trusted-users = root runner' 12 + - name: Cachix 13 + uses: cachix/cachix-action@v16 14 + with: 15 + authToken: $${{ secrets.CACHIX_AUTH_TOKEN }} 16 + name: meowos 17 + - name: Update Flake Inputs 18 + run: nix flake update --accept-flake-config 19 + - name: Build desktop 20 + run: nix build --accept-flake-config .#nixosConfigurations.desktop.config.system.build.toplevel 21 + - name: Build digiboksi 22 + run: nix build --accept-flake-config .#nixosConfigurations.digiboksi.config.system.build.toplevel 23 + - name: Build iso 24 + run: nix build --accept-flake-config .#nixosConfigurations.iso.config.system.build.toplevel 25 + - name: Build t440p 26 + run: nix build --accept-flake-config .#nixosConfigurations.t440p.config.system.build.toplevel 27 + - name: Build uwu 28 + run: nix build --accept-flake-config .#nixosConfigurations.uwu.config.system.build.toplevel 29 + - name: Build vps 30 + run: nix build --accept-flake-config .#nixosConfigurations.vps.config.system.build.toplevel 31 + - name: Build x220 32 + run: nix build --accept-flake-config .#nixosConfigurations.x220.config.system.build.toplevel 33 + - name: Commit 34 + uses: stefanzweifel/git-auto-commit-action@v5 35 + with: 36 + branch: main 37 + commit_author: Flake Bot Update <actions@github.com> 38 + commit_message: 'chore(deps): bump flake.lock' 39 + commit_user_name: Flake Bot Update 40 + file_pattern: flake.lock 41 + skip_dirty_check: false 42 + skip_fetch: true 43 + 'on': 44 + push: {} 45 + workflow_dispatch: {}
+2
flake/default.nix
··· 9 9 ./pkgs.nix 10 10 ]; 11 11 12 + flake.modules = {}; 13 + 12 14 systems = [ 13 15 "x86_64-linux" 14 16 ];
+36 -27
hosts/iso.nix
··· 1 1 { 2 - systemArch = "x86_64-linux"; 2 + lib, 3 + inputs, 4 + pkgs, 5 + ... 6 + }: { 7 + imports = [ 8 + "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-base.nix" 9 + "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" 10 + ]; 3 11 4 - options = { 5 - config, 6 - pkgs, 7 - ... 8 - }: { 9 - username = "iso"; 10 - hostName = "nixos-install"; 11 - timeZone = "Europe/Helsinki"; 12 + config = { 13 + networking.hostName = "meow-iso"; 14 + system.stateVersion = "25.05"; 12 15 13 - workstation.enable = true; 14 - workstation.utils = "generic/gtk"; 15 - workstation.environment = ["hyprland"]; 16 - }; 17 - 18 - system = { 19 - lib, 20 - config, 21 - pkgs, 22 - ... 23 - }: { 24 - system.stateVersion = "25.05"; 16 + time.timeZone = "Europe/Helsinki"; 25 17 26 18 services = { 27 19 qemuGuest.enable = true; 28 20 }; 21 + 22 + # networking.wireless.enable = true; 29 23 30 24 boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest; 31 25 ··· 33 27 settings = { 34 28 Autologin = { 35 29 Session = "hyprland.desktop"; 36 - User = "${config.username}"; 30 + User = "nixos"; 37 31 }; 38 32 }; 39 33 }; 40 34 41 - users.users.${config.username} = { 42 - password = "iso"; 35 + users.users.nixos = { 36 + password = "password"; 37 + initialHashedPassword = lib.mkForce null; 43 38 }; 44 - users.extraUsers.root.password = "iso"; 39 + users.extraUsers.root = { 40 + password = "password"; 41 + initialHashedPassword = lib.mkForce null; 42 + }; 45 43 46 44 networking.useDHCP = lib.mkForce true; 47 45 services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password"; 48 46 49 47 home-manager.sharedModules = [ 50 48 { 51 - stateVersion = "25.05" 52 - mHome.browser.zen.enable = true; 49 + home.stateVersion = "25.05"; 50 + mHome.browser.firefox.enable = true; 51 + mHome.emacs.enable = true; 53 52 } 54 53 ]; 55 54 56 55 meow = { 56 + user = "nixos"; 57 + 57 58 workstation.enable = true; 59 + workstation.environment = ["hyprland"]; 60 + workstation.plasma.opinionatedConfig = true; 61 + workstation.flatpak.enable = false; 62 + 63 + gaming.enable = false; 58 64 59 65 emacs.enable = true; 60 66 shell.enable = true; 67 + 68 + ssh.key = true; 69 + ssh.rootKey = true; 61 70 }; 62 71 63 72 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
-69
iso/default.nix
··· 1 - { 2 - mlib, 3 - lib, 4 - inputs, 5 - ... 6 - }: let 7 - config = { 8 - networking.hostName = "meow-iso"; 9 - system.stateVersion = "24.11"; 10 - 11 - # NetworkManager 12 - networking.wireless.enable = false; 13 - 14 - nixpkgs.hostPlatform = "x86_64-linux"; 15 - 16 - users.users.nixos.initialPassword = "nixos"; 17 - users.users.nixos.initialHashedPassword = lib.mkForce null; 18 - 19 - services.xserver.displayManager.gdm.settings = { 20 - daemon = { 21 - AutomaticLoginEnable = true; 22 - AutomaticLogin = "nixos"; 23 - }; 24 - }; 25 - 26 - home-manager.sharedModules = [ 27 - { 28 - home.stateVersion = "24.11"; 29 - home.file."templates" = { 30 - source = ./templates; 31 - recursive = true; 32 - }; 33 - home.file."host.nix".source = ./templates/host.nix; 34 - home.file."disko.nix".source = ./templates/disko.nix; 35 - 36 - home.file."meowos" = { 37 - recursive = true; 38 - source = ../.; 39 - }; 40 - } 41 - ]; 42 - 43 - meow = { 44 - workstation = { 45 - enable = true; 46 - environment = ["gnome"]; 47 - displayManager = "gdm"; 48 - }; 49 - workstation.flatpak.enable = false; 50 - 51 - shell.enable = true; 52 - 53 - emacs.enable = true; 54 - 55 - ssh.key = true; 56 - ssh.rootKey = true; 57 - 58 - user = "nixos"; 59 - }; 60 - }; 61 - in 62 - mlib.mkSystem { 63 - nixosSystem = lib.nixosSystem; 64 - inherit mlib inputs config; 65 - extraModules = [ 66 - "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-base.nix" 67 - "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" 68 - ]; 69 - }
-3
iso/readme.org
··· 1 - * ISO 2 - 3 - This is not finished at all, in fact it cannot even be built yet.
-70
iso/templates/disko.nix
··· 1 - { 2 - disko.devices = { 3 - nodev."/" = { 4 - fsType = "tmpfs"; 5 - mountOptions = [ 6 - "size=10M" 7 - "defaults" 8 - "mode=755" 9 - ]; 10 - }; 11 - disk.main = { 12 - # Add device here 13 - type = "disk"; 14 - content = { 15 - type = "gpt"; 16 - partitions = { 17 - boot = { 18 - name = "boot"; 19 - size = "1M"; 20 - type = "EF02"; 21 - }; 22 - efi = { 23 - size = "300M"; 24 - type = "EF00"; 25 - content = { 26 - type = "filesystem"; 27 - format = "vfat"; 28 - mountpoint = "/boot"; 29 - }; 30 - }; 31 - main = { 32 - name = "main"; 33 - size = "100%"; 34 - content = { 35 - type = "btrfs"; 36 - subvolumes = { 37 - "@home" = { 38 - mountOptions = []; 39 - mountpoint = "/home"; 40 - }; 41 - "@persist" = { 42 - mountOptions = []; 43 - mountpoint = "/nix/persist"; 44 - }; 45 - "@nix" = { 46 - mountOptions = []; 47 - mountpoint = "/nix"; 48 - }; 49 - "@tmp" = { 50 - mountpoint = "/tmp"; 51 - }; 52 - "@var_tmp" = { 53 - mountpoint = "/var/tmp"; 54 - }; 55 - }; 56 - }; 57 - }; 58 - }; 59 - }; 60 - }; 61 - }; 62 - 63 - meow.impermanence.persist = "/nix/persist"; 64 - 65 - fileSystems = { 66 - "/nix".neededForBoot = true; 67 - "/persist".neededForBoot = true; 68 - "/tmp".neededForBoot = true; 69 - }; 70 - }
-40
iso/templates/host.nix
··· 1 - {...}: let 2 - cfg = builtins.fromTOML ./meow.toml; 3 - 4 - inherit (cfg) user hostname initialPassword desktopEnvironment; 5 - in { 6 - imports = [ 7 - ./disko.nix 8 - ]; 9 - 10 - system.stateVersion = "25.05"; 11 - 12 - time.timeZone = "Europe/Helsinki"; 13 - networking.hostName = hostname; 14 - nixpkgs.hostPlatform = "x86_64-linux"; 15 - 16 - users.users."${user}".initialPassword = initialPassword; 17 - 18 - meow = { 19 - workstation.enable = true; 20 - workstation.environment = [desktopEnvironment]; 21 - 22 - impermanence.enable = true; 23 - 24 - shell.enable = true; 25 - emacs.enable = true; 26 - 27 - ssh.key = false; 28 - 29 - inherit user; 30 - 31 - home.stateVersion = "25.05"; 32 - }; 33 - 34 - boot.loader.grub.enable = true; 35 - 36 - boot.initrd.availableKernelModules = ["ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci"]; 37 - boot.initrd.kernelModules = []; 38 - boot.kernelModules = ["kvm-intel"]; 39 - boot.extraModulePackages = []; 40 - }
-5
iso/templates/meow.toml
··· 1 - hostname = "hostname" 2 - user = "user" 3 - password = "password" 4 - 5 - desktopEnvironment = "gnome"
+1 -1
modules/gaming/default.nix
··· 24 24 25 25 config = lib.mkMerge [ 26 26 { 27 - boot.kernelPackages = mkForce pkgs.linuxPackages_cachyos-lto; 27 + boot.kernelPackages = pkgs.linuxPackages_cachyos-lto; 28 28 # chaotic.mesa-git.enable = true; 29 29 } 30 30 (lib.mkIf (cfg.enable) {
+1 -1
modules/workstation/default.nix
··· 53 53 programs.command-not-found.enable = true; 54 54 programs.command-not-found.dbPath = "${pkgs.path}/programs.sqlite"; 55 55 56 - boot.kernelPackages = pkgs.linuxPackages_cachyos-lto; 56 + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_cachyos-lto; 57 57 58 58 environment.systemPackages = with pkgs; [ 59 59 pulsemixer