Compare commits
	
		
			3 Commits
		
	
	
		
			9fea252f2c
			...
			e2f0c80e31
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| e2f0c80e31 | |||
| 747a9abd01 | |||
| c3ff05b262 | 
@ -9,6 +9,11 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  description = "Kabbone's peronal NixOS Flake config";
 | 
					  description = "Kabbone's peronal NixOS Flake config";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 # nixConfig = {
 | 
				
			||||||
 | 
					 #     extra-substituters = [ "https://app.cachix.org/cache/0uptime" ];
 | 
				
			||||||
 | 
					 #     extra-trusted-public-keys = [ "0uptime.cachix.org-1:ctw8yknBLg9cZBdqss+5krAem0sHYdISkw/IFdRbYdE=" ];
 | 
				
			||||||
 | 
					 # };
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
  inputs =                                                                  # All flake references used to build my NixOS setup. These are dependencies.
 | 
					  inputs =                                                                  # All flake references used to build my NixOS setup. These are dependencies.
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";                  # Nix Packages
 | 
					      nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";                  # Nix Packages
 | 
				
			||||||
 | 
				
			|||||||
@ -213,39 +213,21 @@ in
 | 
				
			|||||||
    ];
 | 
					    ];
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  q920 = lib.nixosSystem {                                # Laptop profile
 | 
					#  vm = lib.nixosSystem {                                    # VM profile
 | 
				
			||||||
    inherit system;
 | 
					#    inherit system;
 | 
				
			||||||
    specialArgs = { inherit inputs user location ; };
 | 
					#    specialArgs = { inherit inputs user location; };
 | 
				
			||||||
    modules = [
 | 
					#    modules = [
 | 
				
			||||||
      ./q920
 | 
					#      ./vm
 | 
				
			||||||
      ./configuration.nix
 | 
					#      ./configuration.nix
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
      home-manager.nixosModules.home-manager {
 | 
					#      home-manager.nixosModules.home-manager {
 | 
				
			||||||
        home-manager.useGlobalPkgs = true;
 | 
					#        home-manager.useGlobalPkgs = true;
 | 
				
			||||||
        home-manager.useUserPackages = true;
 | 
					#        home-manager.useUserPackages = true;
 | 
				
			||||||
        home-manager.extraSpecialArgs = { inherit user; };
 | 
					#        home-manager.extraSpecialArgs = { inherit user; }; 
 | 
				
			||||||
        home-manager.users.${user} = {
 | 
					#        home-manager.users.${user} = {
 | 
				
			||||||
          imports = [(import ./home.nix)] ++ [(import ./q920/home.nix)];
 | 
					#          imports = [(import ./home.nix)] ++ [(import ./vm/home.nix)];
 | 
				
			||||||
        };
 | 
					#        };
 | 
				
			||||||
      }
 | 
					#      }
 | 
				
			||||||
    ];
 | 
					#    ];
 | 
				
			||||||
  };
 | 
					#  };
 | 
				
			||||||
 | 
					 | 
				
			||||||
  vm = lib.nixosSystem {                                    # VM profile
 | 
					 | 
				
			||||||
    inherit system;
 | 
					 | 
				
			||||||
    specialArgs = { inherit inputs user location; };
 | 
					 | 
				
			||||||
    modules = [
 | 
					 | 
				
			||||||
      ./vm
 | 
					 | 
				
			||||||
      ./configuration.nix
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      home-manager.nixosModules.home-manager {
 | 
					 | 
				
			||||||
        home-manager.useGlobalPkgs = true;
 | 
					 | 
				
			||||||
        home-manager.useUserPackages = true;
 | 
					 | 
				
			||||||
        home-manager.extraSpecialArgs = { inherit user; }; 
 | 
					 | 
				
			||||||
        home-manager.users.${user} = {
 | 
					 | 
				
			||||||
          imports = [(import ./home.nix)] ++ [(import ./vm/home.nix)];
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,111 +0,0 @@
 | 
				
			|||||||
#
 | 
					 | 
				
			||||||
#  Specific system configuration settings for desktop
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#  flake.nix
 | 
					 | 
				
			||||||
#   ├─ ./hosts
 | 
					 | 
				
			||||||
#   │   └─ ./laptop
 | 
					 | 
				
			||||||
#   │        ├─ default.nix *
 | 
					 | 
				
			||||||
#   │        └─ hardware-configuration.nix       
 | 
					 | 
				
			||||||
#   └─ ./modules
 | 
					 | 
				
			||||||
#       ├─ ./desktop
 | 
					 | 
				
			||||||
#       │   └─ ./hyprland
 | 
					 | 
				
			||||||
#       │       └─ hyprland.nix
 | 
					 | 
				
			||||||
#       ├─ ./modules
 | 
					 | 
				
			||||||
#       │   └─ ./programs
 | 
					 | 
				
			||||||
#       │       └─ waybar.nix
 | 
					 | 
				
			||||||
#       └─ ./hardware
 | 
					 | 
				
			||||||
#           └─ default.nix
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{ config, pkgs, user, ... }:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  imports =                                                         # For now, if applying to other system, swap files
 | 
					 | 
				
			||||||
    [(import ./hardware-configuration.nix)] ++                      # Current system hardware config @ /etc/nixos/hardware-configuration.nix
 | 
					 | 
				
			||||||
    [(import ../../modules/desktop/hyprland/default.nix)] ++        # Window Manager
 | 
					 | 
				
			||||||
    [(import ../../modules/desktop/virtualisation/docker.nix)]; # ++   # Docker
 | 
					 | 
				
			||||||
    #(import ../../modules/hardware);                                # Hardware devices
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  boot = {                                  # Boot options
 | 
					 | 
				
			||||||
    kernelPackages = pkgs.linuxPackages_latest;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    loader = {                              # EFI Boot
 | 
					 | 
				
			||||||
      systemd-boot.enable = true;
 | 
					 | 
				
			||||||
      efi = {
 | 
					 | 
				
			||||||
        canTouchEfiVariables = true;
 | 
					 | 
				
			||||||
        efiSysMountPoint = "/boot";
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
      timeout = 1;                          # Grub auto select time
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#  hardware.sane = {                           # Used for scanning with Xsane
 | 
					 | 
				
			||||||
#    enable = false;
 | 
					 | 
				
			||||||
#    extraBackends = [ pkgs.sane-airscan ];
 | 
					 | 
				
			||||||
#  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#  environment = {
 | 
					 | 
				
			||||||
#    systemPackages = with pkgs; [
 | 
					 | 
				
			||||||
#      simple-scan
 | 
					 | 
				
			||||||
#    ];
 | 
					 | 
				
			||||||
#  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  programs = {                              # No xbacklight, this is the alterantive
 | 
					 | 
				
			||||||
#    dconf.enable = true;
 | 
					 | 
				
			||||||
#    light.enable = true;
 | 
					 | 
				
			||||||
    ssh.startAgent = false;
 | 
					 | 
				
			||||||
    gnupg.agent = {
 | 
					 | 
				
			||||||
      enable = true;
 | 
					 | 
				
			||||||
      enableSSHSupport = true;
 | 
					 | 
				
			||||||
      pinentryFlavor = "curses";
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  services = {
 | 
					 | 
				
			||||||
#    tlp.enable = true;                      # TLP and auto-cpufreq for power management
 | 
					 | 
				
			||||||
    #logind.lidSwitch = "ignore";            # Laptop does not go to sleep when lid is closed
 | 
					 | 
				
			||||||
    auto-cpufreq.enable = true;
 | 
					 | 
				
			||||||
    blueman.enable = true;
 | 
					 | 
				
			||||||
    pcscd.enable = true;
 | 
					 | 
				
			||||||
    udev.packages = [ 
 | 
					 | 
				
			||||||
        pkgs.nitrokey-udev-rules
 | 
					 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
    printing = {                            # Printing and drivers for TS5300
 | 
					 | 
				
			||||||
      enable = true;
 | 
					 | 
				
			||||||
      drivers = [ pkgs.gutenprint ];
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
    avahi = {                               # Needed to find wireless printer
 | 
					 | 
				
			||||||
      enable = true;
 | 
					 | 
				
			||||||
      nssmdns = true;
 | 
					 | 
				
			||||||
      publish = {                           # Needed for detecting the scanner
 | 
					 | 
				
			||||||
        enable = true;
 | 
					 | 
				
			||||||
        addresses = true;
 | 
					 | 
				
			||||||
        userServices = true;
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    #xserver = {
 | 
					 | 
				
			||||||
    #  libinput = {                          # Trackpad support & gestures
 | 
					 | 
				
			||||||
    #    touchpad = {
 | 
					 | 
				
			||||||
    #      tapping = true;
 | 
					 | 
				
			||||||
    #      scrollMethod = "twofinger";
 | 
					 | 
				
			||||||
    #      naturalScrolling = true;            # The correct way of scrolling
 | 
					 | 
				
			||||||
    #      accelProfile = "adaptive";          # Speed settings
 | 
					 | 
				
			||||||
    #      #accelSpeed = "-0.5";
 | 
					 | 
				
			||||||
    #      disableWhileTyping = true;
 | 
					 | 
				
			||||||
    #    };
 | 
					 | 
				
			||||||
    #  };
 | 
					 | 
				
			||||||
    #  resolutions = [
 | 
					 | 
				
			||||||
    #    { x = 1600; y = 920; }
 | 
					 | 
				
			||||||
    #    { x = 1280; y = 720; }
 | 
					 | 
				
			||||||
    #    { x = 1920; y = 1080; }
 | 
					 | 
				
			||||||
    #  ];
 | 
					 | 
				
			||||||
    #};
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  #temporary bluetooth fix
 | 
					 | 
				
			||||||
#  systemd.tmpfiles.rules = [
 | 
					 | 
				
			||||||
#    "d /var/lib/bluetooth 700 root root - -"
 | 
					 | 
				
			||||||
#  ];
 | 
					 | 
				
			||||||
#  systemd.targets."bluetooth".after = ["systemd-tmpfiles-setup.service"];
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,82 +0,0 @@
 | 
				
			|||||||
#
 | 
					 | 
				
			||||||
# Hardware settings for Teclast F5 10" Laptop
 | 
					 | 
				
			||||||
# NixOS @ sda2
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# flake.nix
 | 
					 | 
				
			||||||
#  └─ ./hosts
 | 
					 | 
				
			||||||
#      └─ ./laptop
 | 
					 | 
				
			||||||
#          └─ hardware-configuration.nix *
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
# 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 = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
 | 
					 | 
				
			||||||
  boot.initrd.kernelModules = [ ];
 | 
					 | 
				
			||||||
  boot.kernelModules = [ "kvm-intel" ];
 | 
					 | 
				
			||||||
  boot.extraModulePackages = [ ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  fileSystems."/" =
 | 
					 | 
				
			||||||
    { device = "/dev/disk/by-label/ROOT";
 | 
					 | 
				
			||||||
      fsType = "btrfs";
 | 
					 | 
				
			||||||
      options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@" ];
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  fileSystems."/home" =
 | 
					 | 
				
			||||||
    { device = "/dev/disk/by-label/ROOT";
 | 
					 | 
				
			||||||
      fsType = "btrfs";
 | 
					 | 
				
			||||||
      options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@home" ];
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  fileSystems."/srv" =
 | 
					 | 
				
			||||||
    { device = "/dev/disk/by-label/ROOT";
 | 
					 | 
				
			||||||
      fsType = "btrfs";
 | 
					 | 
				
			||||||
      options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@srv" ];
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  fileSystems."/boot" =
 | 
					 | 
				
			||||||
    { device = "/dev/disk/by-label/BOOT";
 | 
					 | 
				
			||||||
      fsType = "vfat";
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  swapDevices = [ ];
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  networking = {
 | 
					 | 
				
			||||||
    useDHCP = false;                        # Deprecated
 | 
					 | 
				
			||||||
    hostName = "q920";
 | 
					 | 
				
			||||||
    networkmanager.enable = true;
 | 
					 | 
				
			||||||
    interfaces = {
 | 
					 | 
				
			||||||
      enp0s25 = {
 | 
					 | 
				
			||||||
        useDHCP = true;                     # For versatility sake, manually edit IP on nm-applet.
 | 
					 | 
				
			||||||
        #ipv4.addresses = [ {
 | 
					 | 
				
			||||||
        #    address = "192.168.0.51";
 | 
					 | 
				
			||||||
        #    prefixLength = 24;
 | 
					 | 
				
			||||||
        #} ];
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
#      wlo1 = {
 | 
					 | 
				
			||||||
#        useDHCP = true;
 | 
					 | 
				
			||||||
#        #ipv4.addresses = [ {
 | 
					 | 
				
			||||||
#        #  address = "192.168.0.51";
 | 
					 | 
				
			||||||
#        #  prefixLength = 24;
 | 
					 | 
				
			||||||
#        #} ];  
 | 
					 | 
				
			||||||
#      };
 | 
					 | 
				
			||||||
    };
 | 
					 | 
				
			||||||
    #defaultGateway = "192.168.0.1";
 | 
					 | 
				
			||||||
    #nameservers = [ "192.168.0.4" ];
 | 
					 | 
				
			||||||
    #firewall = {
 | 
					 | 
				
			||||||
    #  enable = false;
 | 
					 | 
				
			||||||
    #  #allowedUDPPorts = [ 53 67 ];
 | 
					 | 
				
			||||||
    #  #allowedTCPPorts = [ 53 80 443 9443 ];
 | 
					 | 
				
			||||||
    #};
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
 | 
					 | 
				
			||||||
  # high-resolution display
 | 
					 | 
				
			||||||
  hardware.video.hidpi.enable = lib.mkDefault true;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -1,50 +0,0 @@
 | 
				
			|||||||
#
 | 
					 | 
				
			||||||
#  Home-manager configuration for laptop
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
#  flake.nix
 | 
					 | 
				
			||||||
#   ├─ ./hosts
 | 
					 | 
				
			||||||
#   │   └─ ./laptop
 | 
					 | 
				
			||||||
#   │       └─ home.nix *
 | 
					 | 
				
			||||||
#   └─ ./modules
 | 
					 | 
				
			||||||
#       └─ ./desktop
 | 
					 | 
				
			||||||
#           └─ ./hyprland
 | 
					 | 
				
			||||||
#              └─ hyprland.nix
 | 
					 | 
				
			||||||
#
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{ pkgs, ... }:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  imports =
 | 
					 | 
				
			||||||
    [
 | 
					 | 
				
			||||||
      ../../modules/desktop/hyprland/home.nix # Window Manager
 | 
					 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  home = {                                # Specific packages for laptop
 | 
					 | 
				
			||||||
    packages = with pkgs; [
 | 
					 | 
				
			||||||
      # Applications
 | 
					 | 
				
			||||||
      libreoffice                         # Office packages
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      # Display
 | 
					 | 
				
			||||||
      #light                              # xorg.xbacklight not supported. Other option is just use xrandr.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      # Power Management
 | 
					 | 
				
			||||||
      auto-cpufreq                       # Power management
 | 
					 | 
				
			||||||
      #tlp                                # Power management
 | 
					 | 
				
			||||||
    ];
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  programs = {
 | 
					 | 
				
			||||||
    alacritty.settings.font.size = 11;
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  services = {                            # Applets
 | 
					 | 
				
			||||||
    blueman-applet.enable = true;         # Bluetooth
 | 
					 | 
				
			||||||
    network-manager-applet.enable = true; # Network
 | 
					 | 
				
			||||||
#   cbatticon = {
 | 
					 | 
				
			||||||
#     enable = true;
 | 
					 | 
				
			||||||
#     criticalLevelPercent = 10;
 | 
					 | 
				
			||||||
#     lowLevelPercent = 20;
 | 
					 | 
				
			||||||
#     iconType = null;
 | 
					 | 
				
			||||||
#   };
 | 
					 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -25,12 +25,13 @@
 | 
				
			|||||||
              coreutils
 | 
					              coreutils
 | 
				
			||||||
              wget
 | 
					              wget
 | 
				
			||||||
              gnused
 | 
					              gnused
 | 
				
			||||||
 | 
					#              agenix.packages.x86_64-linux.default
 | 
				
			||||||
            ];
 | 
					            ];
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  age.secrets."services/gitea/runner-token" = {
 | 
					    age.secrets."services/gitea/runner-token" = {
 | 
				
			||||||
    file = ../../../secrets/services/gitea/runner-token.age;
 | 
					      file = ../../../secrets/services/gitea/runner-token.age;
 | 
				
			||||||
    owner = "gitea-runner";
 | 
					      owner = "gitea-runner";
 | 
				
			||||||
  };
 | 
					    };
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
{ microvm, nixpkgs, user, agenix, ... }:
 | 
					{ config, microvm, nixpkgs, user, agenix, ... }:
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  name = "gitea-runner";
 | 
					  name = "gitea-runner";
 | 
				
			||||||
in
 | 
					in
 | 
				
			||||||
@ -10,14 +10,18 @@ in
 | 
				
			|||||||
    vms = {
 | 
					    vms = {
 | 
				
			||||||
      ${name} = {
 | 
					      ${name} = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        pkgs = import nixpkgs {
 | 
					        pkgs = import nixpkgs {
 | 
				
			||||||
          system = "x86_64-linux";
 | 
					          system = "x86_64-linux";
 | 
				
			||||||
          config.allowUnfree = true;
 | 
					          config.allowUnfree = true;
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #inherit pkgs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        config = {
 | 
					        config = {
 | 
				
			||||||
          imports = [( ./gitea_runner.nix )];
 | 
					          imports = 
 | 
				
			||||||
 | 
					            [ agenix.nixosModules.default ] ++
 | 
				
			||||||
 | 
					            [( ./gitea_runner.nix )];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          networking = {
 | 
					          networking = {
 | 
				
			||||||
            hostName = "${name}";
 | 
					            hostName = "${name}";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user