bro ion even no
This commit is contained in:
parent
69a92fdd5e
commit
ed13a64d87
9 changed files with 215 additions and 22 deletions
|
|
@ -14,11 +14,16 @@
|
||||||
vscode
|
vscode
|
||||||
steam
|
steam
|
||||||
bitwarden-desktop
|
bitwarden-desktop
|
||||||
|
signal-desktop
|
||||||
nixd
|
nixd
|
||||||
treefmt
|
treefmt
|
||||||
tealdeer
|
tealdeer
|
||||||
];
|
];
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
SSH_AUTH_SOCK = "/home/strix/.bitwarden-ssh-agent.sock";
|
||||||
|
};
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
||||||
BIN
common/profile.png
Normal file
BIN
common/profile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 330 KiB |
|
|
@ -1,7 +1,19 @@
|
||||||
{ home-manager, inputs, filter, ... }:
|
{ home-manager, inputs, filter, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
../util/profile-icons.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs filter; };
|
||||||
|
home-manager.users.strix = ./home.nix;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
users.users."strix" = {
|
users.users."strix" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
icon = "${./common/profile.png}";
|
||||||
description = "Strix";
|
description = "Strix";
|
||||||
initialPassword = "changeme";
|
initialPassword = "changeme";
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
|
|
@ -14,13 +26,4 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.extraSpecialArgs = { inherit inputs filter; };
|
|
||||||
home-manager.users.strix = ./home.nix;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../common
|
../../common
|
||||||
|
|
@ -7,20 +7,31 @@
|
||||||
|
|
||||||
networking.hostName = "p14s";
|
networking.hostName = "p14s";
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-d51bdb99-5966-40d3-a920-83ea78a73699".device = "/dev/disk/by-uuid/d51bdb99-5966-40d3-a920-83ea78a73699";
|
# secure boot shit
|
||||||
|
environment.systemPackages = [ pkgs.sbctl ];
|
||||||
|
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||||
|
boot.lanzaboote = {
|
||||||
|
enable = true;
|
||||||
|
pkiBundle = "/var/lib/sbctl";
|
||||||
|
};
|
||||||
|
|
||||||
|
# swap & hibernate
|
||||||
|
boot.initrd.luks.devices."luks-d51bdb99-5966-40d3-a920-83ea78a73699" = {
|
||||||
|
device = "/dev/disk/by-uuid/d51bdb99-5966-40d3-a920-83ea78a73699";
|
||||||
|
crypttabExtraOpts = [ "tpm2-device=auto" ];
|
||||||
|
};
|
||||||
|
boot.kernelParams = [ "resume=/dev/disk/by-uuid/d51bdb99-5966-40d3-a920-83ea78a73699" ];
|
||||||
|
|
||||||
|
# vm definition
|
||||||
virtualisation.vmVariant = {
|
virtualisation.vmVariant = {
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
memorySize = 8192;
|
memorySize = 8192;
|
||||||
cores = 6;
|
cores = 6;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
users.users."guest" = {
|
environment.systemPackages = with pkgs; [
|
||||||
isNormalUser = true;
|
spice-vdagentd
|
||||||
name = "Guest";
|
];
|
||||||
initialPassword = "guest";
|
|
||||||
createHome = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "26.05"; # yes
|
system.stateVersion = "26.05"; # yes
|
||||||
|
|
|
||||||
122
flake.lock
generated
122
flake.lock
generated
|
|
@ -1,5 +1,58 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"crane": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1781825982,
|
||||||
|
"narHash": "sha256-SlXKwIRIhrOSAcTjCB3ftPLzJWZStQIPS7J1FlZPnKk=",
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"rev": "469fd08d0bcf6926321fa973c6777fbc87785dd7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "ipetkov",
|
||||||
|
"repo": "crane",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1767039857,
|
||||||
|
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"lanzaboote",
|
||||||
|
"pre-commit",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709087332,
|
||||||
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
@ -20,6 +73,30 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"lanzaboote": {
|
||||||
|
"inputs": {
|
||||||
|
"crane": "crane",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"pre-commit": "pre-commit",
|
||||||
|
"rust-overlay": "rust-overlay"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1782141370,
|
||||||
|
"narHash": "sha256-hqijVSEETttmo8Okql9/LG0Ua34hdciKW1a5zzlj8mU=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "lanzaboote",
|
||||||
|
"rev": "7c9a54a7f87b4539ddbd8bda09a8a5f5f9361aa9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "v1.1.0",
|
||||||
|
"repo": "lanzaboote",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1787360063,
|
"lastModified": 1787360063,
|
||||||
|
|
@ -36,11 +113,56 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"pre-commit": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": [
|
||||||
|
"lanzaboote",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1781733627,
|
||||||
|
"narHash": "sha256-U3yTuGBnmXvXoQI3qkpfEDsn9RovQPAjN7ndRco+3u0=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "pre-commit-hooks.nix",
|
||||||
|
"rev": "3bbec39bc90eadfa031e6f3b77272f3f60803e39",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "pre-commit-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"lanzaboote": "lanzaboote",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"rust-overlay": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"lanzaboote",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1782012058,
|
||||||
|
"narHash": "sha256-9mWUnReOUXfKjZuJAL/bAFH3LUyECTRtXgSNVjRw3UY=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "8534567325bd8a8d2928e6afd81e0a87d19efd3c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,11 @@
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inputs.lanzaboote = {
|
||||||
|
url = "github:nix-community/lanzaboote/v1.1.0";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
|
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
|
||||||
let
|
let
|
||||||
filter = with nixpkgs.lib;
|
filter = with nixpkgs.lib;
|
||||||
|
|
@ -23,6 +28,7 @@
|
||||||
{
|
{
|
||||||
nixosConfigurations.p14s = nixosConfig {
|
nixosConfigurations.p14s = nixosConfig {
|
||||||
modules = [
|
modules = [
|
||||||
|
inputs.lanzaboote.nixosModules.lanzaboote
|
||||||
./devices/p14s
|
./devices/p14s
|
||||||
./styles/desktop.nix
|
./styles/desktop.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.timeout = 0;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
|
@ -11,15 +12,29 @@
|
||||||
boot.initrd.verbose = false;
|
boot.initrd.verbose = false;
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"quiet"
|
"quiet"
|
||||||
|
"udev.log_priority=3"
|
||||||
"rd.udev.log_level=3"
|
"rd.udev.log_level=3"
|
||||||
"rd.systemd.show_status=auto"
|
"rd.systemd.show_status=auto"
|
||||||
];
|
];
|
||||||
|
boot.initrd.checkJournalingFS = false;
|
||||||
|
|
||||||
|
|
||||||
boot.plymouth = {
|
boot.plymouth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = "bgrt";
|
theme = "bgrt";
|
||||||
|
package = pkgs.plymouth.overrideAttrs (old: {
|
||||||
|
postInstall = (old.postInstall or "") + ''
|
||||||
|
sed -i \
|
||||||
|
-e 's/DialogClearsFirmwareBackground=true/DialogClearsFirmwareBackground=false/' \
|
||||||
|
-e 's/DialogVerticalAlignment=.382/DialogVerticalAlignment=.55/' \
|
||||||
|
-e 's/TitleVerticalAlignment=.382/TitleVerticalAlignment=.55/' \
|
||||||
|
$out/share/plymouth/themes/bgrt/bgrt.plymouth
|
||||||
|
'';
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
time.timeZone = "Europe/Amsterdam";
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
@ -66,8 +81,6 @@
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
|
|
||||||
programs.command-not-found.enable = true;
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
|
|
@ -80,6 +93,7 @@
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
neovim
|
neovim
|
||||||
|
htop
|
||||||
dnsmasq
|
dnsmasq
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
programs.command-not-found.enable = true;
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
||||||
33
util/profile-icons.nix
Normal file
33
util/profile-icons.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{ lib, config, ...}:
|
||||||
|
|
||||||
|
let
|
||||||
|
userOptions = with lib; {
|
||||||
|
options.icon = mkOption { type = types.nullOr types.path; default = null; };
|
||||||
|
};
|
||||||
|
|
||||||
|
mkGdmUserConf = icon: ''
|
||||||
|
[User]
|
||||||
|
Session=
|
||||||
|
XSession=
|
||||||
|
Icon=${icon}
|
||||||
|
SystemAccount=false
|
||||||
|
'';
|
||||||
|
|
||||||
|
userList = with lib; filter (entry: entry.icon != null) (mapAttrsToList (name: value: { inherit name; icon = value.icon; }) config.users.users);
|
||||||
|
|
||||||
|
mkBootCommand = entry: "echo -e '${mkGdmUserConf entry.icon}' > /var/lib/AccountsService/users/${entry.name}\n";
|
||||||
|
|
||||||
|
bootCommands = map mkBootCommand userList;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
users.users = with lib; with types; mkOption {
|
||||||
|
type = attrsOf (submodule userOptions);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.services.xserver.displayManager.gdm.enable {
|
||||||
|
boot.postBootCommands = with lib; strings.concatStrings bootCommands;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue