disko + some stuff ported from arch
This commit is contained in:
parent
1f8cd27be2
commit
c2e1d5b4e4
10 changed files with 178 additions and 56 deletions
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./hardware-config.nix
|
||||
./options.nix
|
||||
./disko.nix
|
||||
];
|
||||
|
||||
networking.hostName = "akarso";
|
||||
|
@ -12,6 +13,7 @@
|
|||
systemd-boot = {
|
||||
enable = true;
|
||||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
hardware.opengl = {
|
||||
|
|
60
devices/akarso/disko.nix
Normal file
60
devices/akarso/disko.nix
Normal file
|
@ -0,0 +1,60 @@
|
|||
{ ... }: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
vdb = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
settings = {
|
||||
allowDiscards = true;
|
||||
};
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
"/persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
swapfile = {
|
||||
size = "8G";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -8,23 +8,6 @@
|
|||
extraModulePackages = [ ];
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/4ecc3b27-016f-4416-a819-bd0998fc993f";
|
||||
fsType = "ext4";
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/0721-3632";
|
||||
fsType = "vfat";
|
||||
};
|
||||
"/ext" = {
|
||||
device = "/dev/disk/by-uuid/b3faf000-8792-4fca-916a-5965c0cb8186";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [ { device = "/dev/disk/by-uuid/b35abec3-ff20-4b3b-b953-e36f2df719cb"; } ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
|
|
@ -4,6 +4,11 @@
|
|||
url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
|
@ -87,16 +87,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
excludePackages = [ pkgs.xterm ];
|
||||
displayManager.gdm.enable = true;
|
||||
xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
|
||||
# Needed for some features in nautilus such as auto-mounting and trash
|
||||
services.gvfs.enable = true;
|
||||
|
||||
|
@ -110,8 +100,8 @@
|
|||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
programs.fish.enable = true;
|
||||
users.defaultUserShell = pkgs.fish;
|
||||
|
||||
security.pam.services.swaylock = {};
|
||||
}
|
||||
|
|
|
@ -23,26 +23,72 @@ in lib.mkIf (osConfig.withNiri) {
|
|||
layer = "top";
|
||||
position = "top";
|
||||
modules-left = [
|
||||
"network"
|
||||
"memory"
|
||||
"cpu"
|
||||
];
|
||||
modules-center = [
|
||||
"clock"
|
||||
];
|
||||
modules-right = [
|
||||
"network"
|
||||
"wireplumber"
|
||||
"battery"
|
||||
];
|
||||
"cpu" = {
|
||||
interval = 10;
|
||||
format = "{usage}% ";
|
||||
};
|
||||
"memory" = {
|
||||
interval = 30;
|
||||
format = "{percentage}% ";
|
||||
};
|
||||
"clock" = {
|
||||
format = "{:%H:%M}";
|
||||
format-alt = "{:%a, %Y-%m-%d}";
|
||||
};
|
||||
"battery" = {
|
||||
states = {
|
||||
good = 80;
|
||||
warning = 50;
|
||||
critical = 20;
|
||||
};
|
||||
format = "{icon}";
|
||||
format-alt = "{capacity}%";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
tooltip = false;
|
||||
};
|
||||
"network" = {
|
||||
format-wifi = "{icon}";
|
||||
format-alt = "{essid}";
|
||||
format-ethernet = "";
|
||||
format-disconnected = "";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
tooltip = false;
|
||||
};
|
||||
"wireplumber" = {
|
||||
format = "{icon}";
|
||||
format-alt = "{volume}%";
|
||||
format-muted = "";
|
||||
format-icons = ["" "" ""];
|
||||
tooltip = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
# style = import ./waybar-style.nix;
|
||||
style = builtins.readFile(./waybar.css);
|
||||
};
|
||||
|
||||
services.mako = {
|
||||
enable = true;
|
||||
defaultTimeout = 5;
|
||||
defaultTimeout = 5000;
|
||||
maxHistory = 20;
|
||||
maxVisible = 3;
|
||||
font = "AlegreyaSans";
|
||||
backgroundColor = theme.base.hex;
|
||||
borderColor = theme.muted.hex;
|
||||
textColor = theme.text.hex;
|
||||
borderSize = 1;
|
||||
borderRadius = 8;
|
||||
icons = false;
|
||||
};
|
||||
|
||||
programs.swaylock = {
|
||||
|
|
45
modules/home/niri-setup/waybar.css
Normal file
45
modules/home/niri-setup/waybar.css
Normal file
|
@ -0,0 +1,45 @@
|
|||
* {
|
||||
border: none;
|
||||
font-family: FiraCodeNerdFont;
|
||||
font-size: 13px;
|
||||
color: #191724;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
/*-----module groups----*/
|
||||
.modules-right {
|
||||
background-color: #c4a7e7;
|
||||
margin: 2px 10px 0 0;
|
||||
}
|
||||
.modules-center {
|
||||
background-color: #c4a7e7;
|
||||
margin: 2px 0 0 0;
|
||||
}
|
||||
.modules-left {
|
||||
margin: 2px 0 0 10px;
|
||||
background-color: #c4a7e7;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#network,
|
||||
#wireplumber {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
/*-----Indicators----*/
|
||||
#battery.charging {
|
||||
color: #31748f;
|
||||
}
|
||||
#battery.warning:not(.charging) {
|
||||
color: #eb6f92;
|
||||
}
|
||||
#battery.critical:not(.charging) {
|
||||
color: #eb6f92;
|
||||
}
|
|
@ -108,16 +108,8 @@
|
|||
# For direnv and shell aliases the shell needs to be managed by hm
|
||||
programs.bash.enable = true;
|
||||
|
||||
programs.zsh = {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
autosuggestion.enable = true;
|
||||
enableVteIntegration = true;
|
||||
history.ignoreAllDups = true;
|
||||
historySubstringSearch.enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" "thefuck" ];
|
||||
theme = "bira";
|
||||
};
|
||||
plugins = with pkgs.fishPlugins; [ pure ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,12 +2,8 @@
|
|||
programs.niri.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
brightnessctl
|
||||
swaybg
|
||||
pamixer
|
||||
xwayland
|
||||
i3
|
||||
rofi
|
||||
];
|
||||
|
||||
home-manager.users.twoneis = {
|
||||
programs.niri = {
|
||||
settings = {
|
||||
|
@ -36,7 +32,7 @@
|
|||
};
|
||||
position = {
|
||||
x=0;
|
||||
y=1200;
|
||||
y=0;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -48,7 +44,7 @@
|
|||
refresh = 59.940;
|
||||
};
|
||||
position = {
|
||||
x=0;
|
||||
x=2736;
|
||||
y=0;
|
||||
};
|
||||
};
|
||||
|
@ -74,6 +70,11 @@
|
|||
gaps = 4;
|
||||
};
|
||||
|
||||
window-rule = {
|
||||
geometry-corner-radius = 8;
|
||||
clip-to-geometry = true;
|
||||
};
|
||||
|
||||
prefer-no-csd = true;
|
||||
|
||||
screenshot-path = "~/Pictures/Screenshots/%Y-%m-%d-%H-%M-%S.png";
|
||||
|
@ -82,20 +83,17 @@
|
|||
|
||||
spawn-at-startup = [
|
||||
{ command = ["waybar"]; }
|
||||
{ command = ["swaybg" "-i" "${../../wallpaper/wallpaper.png}" "-m" "fill"]; }
|
||||
{ command = ["pamixer" "--set-volume" "0"]; }
|
||||
{ command = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0"]; }
|
||||
{ command = ["brightnessctl" "s" "50%"]; }
|
||||
{ command = ["systemctl" "--user" "restart" "spotifyd.service"]; }
|
||||
];
|
||||
|
||||
binds = {
|
||||
"Mod+T".action.spawn = "alacritty";
|
||||
"Mod+B".action.spawn = "firefox";
|
||||
"Mod+S".action.spawn = ["fuzzel" "-I" "-T" "alacritty" "-p" ""];
|
||||
"Mod+X".action.spawn = ["sh" "-c" "Xwayland & env DISPLAY=:0 i3"];
|
||||
|
||||
"XF86AudioRaiseVolume".action.spawn = ["pamixer" "-i" "5"];
|
||||
"XF86AudioLowerVolume".action.spawn = ["pamixer" "-d" "5"];
|
||||
"XF86AudioRaiseVolume".action.spawn = ["wpctl" "set-volume" "-l" "1" "@DEFAULT_AUDIO_SINK@" "5%+"];
|
||||
"XF86AudioLowerVolume".action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-"];
|
||||
"XF86MonBrightnessDown".action.spawn = ["brightnessctl" "-n=10%" "s" "5%-"];
|
||||
"XF86MonBrightnessUp".action.spawn = ["brightnessctl" "s" "5%+"];
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ nixpkgs, home-manager, nixos-hardware, niri, ... }@inputs: {
|
||||
{ nixpkgs, disko, home-manager, nixos-hardware, niri, ... }@inputs: {
|
||||
nixosConfigurations = {
|
||||
# AMD Ryzen 5600X
|
||||
# nvidia GeForce GTX 1060 (6GB)
|
||||
|
@ -26,6 +26,7 @@
|
|||
./devices/akarso
|
||||
./modules
|
||||
./options.nix
|
||||
disko.nixosModules.disko
|
||||
nixos-hardware.nixosModules.microsoft-surface-pro-intel
|
||||
niri.nixosModules.niri
|
||||
home-manager.nixosModules.home-manager
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue